Skip to content

Commit

Permalink
Fix \t vs \s errors in webui_explainer.md
Browse files Browse the repository at this point in the history
TBR=dpapad@chromium.org
NOTRY=true
BUG=none

Review-Url: https://codereview.chromium.org/2938323003
Cr-Commit-Position: refs/heads/master@{#480201}
  • Loading branch information
danbeam authored and Commit Bot committed Jun 16, 2017
1 parent 040abfa commit 8b52edf
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/webui_explainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ bindings](#bindings) via the child security policy.
```c++
// RenderFrameHostImpl::AllowBindings():
if (bindings_flags & BINDINGS_POLICY_WEB_UI) {
ChildProcessSecurityPolicyImpl::GetInstance()->GrantWebUIBindings(
GetProcess()->GetID());
ChildProcessSecurityPolicyImpl::GetInstance()->GrantWebUIBindings(
GetProcess()->GetID());
}
```

Expand Down Expand Up @@ -449,7 +449,7 @@ global "cr.webUIResponse" method with a success value of false.
```c++
// WebUIMessageHandler::RejectJavascriptCallback():
CallJavascriptFunction("cr.webUIResponse", callback_id, base::Value(false),
response);
response);
```

See also: [`ResolveJavascriptCallback`](#ResolveJavascriptCallback)
Expand Down Expand Up @@ -503,10 +503,10 @@ renderer:
```c++
// WebUIExtension::Install():
v8::Local<v8::Object> chrome =
GetOrCreateChromeObject(isolate, context->Global());
GetOrCreateChromeObject(isolate, context->Global());
chrome->Set(gin::StringToSymbol(isolate, "send"),
gin::CreateFunctionTemplate(
isolate, base::Bind(&WebUIExtension::Send))->GetFunction());
gin::CreateFunctionTemplate(
isolate, base::Bind(&WebUIExtension::Send))->GetFunction());
```
The `chrome.send()` method takes a message name and argument list.
Expand All @@ -521,8 +521,8 @@ The message name and argument list are serialized to JSON and sent via the
```c++
// In the renderer (WebUIExtension::Send()):
render_view->Send(new ViewHostMsg_WebUISend(render_view->GetRoutingID(),
frame->GetDocument().Url(),
message, *content));
frame->GetDocument().Url(),
message, *content));
```
```c++
// In the browser (WebUIImpl::OnMessageReceived()):
Expand Down

0 comments on commit 8b52edf

Please sign in to comment.