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

Side by Side Diff: content/renderer/web_ui_extension.h

Issue 163683004: Implement WebUI extension via gin instead of v8::Extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/web_ui_extension.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_WEBUI_EXTENSION_H_ 5 #ifndef CONTENT_RENDERER_WEBUI_EXTENSION_H_
6 #define CONTENT_RENDERER_WEBUI_EXTENSION_H_ 6 #define CONTENT_RENDERER_WEBUI_EXTENSION_H_
7 7
8 #include <string>
9
8 #include "base/basictypes.h" 10 #include "base/basictypes.h"
9 11
10 namespace v8 { 12 namespace blink {
11 class Extension; 13 class WebFrame;
14 }
15
16 namespace gin {
17 class Arguments;
12 } 18 }
13 19
14 namespace content { 20 namespace content {
15 21
16 class WebUIExtension { 22 class WebUIExtension {
17 public: 23 public:
18 // Returns the v8::Extension object handling WebUI bindings. Caller takes 24 static void Install(blink::WebFrame* frame);
19 // ownership of returned object.
20 static v8::Extension* Get();
21 25
22 private: 26 private:
27 static void Send(gin::Arguments* args);
28 static std::string GetVariableValue(const std::string& name);
29
23 DISALLOW_IMPLICIT_CONSTRUCTORS(WebUIExtension); 30 DISALLOW_IMPLICIT_CONSTRUCTORS(WebUIExtension);
24 }; 31 };
25 32
26 } // namespace content 33 } // namespace content
27 34
28 #endif // CONTENT_RENDERER_WEBUI_EXTENSION_H_ 35 #endif // CONTENT_RENDERER_WEBUI_EXTENSION_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/web_ui_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698