Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3513)

Unified Diff: docs/webui_explainer.md

Issue 2938323003: Fix \t vs \s errors in webui_explainer.md (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: docs/webui_explainer.md
diff --git a/docs/webui_explainer.md b/docs/webui_explainer.md
index bd298d963e4d5c0723b0089908d890dc03458abd..e9a9284305e83424148dca53a7ca4f8541ae0dbe 100644
--- a/docs/webui_explainer.md
+++ b/docs/webui_explainer.md
@@ -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());
}
```
@@ -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)
@@ -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.
@@ -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()):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698