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

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

Issue 206923002: Adds plumbing to pass WebUI mojo::Handle from browser to renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add TODO and merge to trunk Created 6 years, 9 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/web_ui_mojo.cc ('k') | content/renderer/web_ui_mojo_context_state.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_WEB_UI_MOJO_CONTEXT_STATE_H_ 5 #ifndef CONTENT_RENDERER_WEB_UI_MOJO_CONTEXT_STATE_H_
6 #define CONTENT_RENDERER_WEB_UI_MOJO_CONTEXT_STATE_H_ 6 #define CONTENT_RENDERER_WEB_UI_MOJO_CONTEXT_STATE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 21 matching lines...) Expand all
32 // WebUIMojoContextState manages the modules needed for mojo bindings. It does 32 // WebUIMojoContextState manages the modules needed for mojo bindings. It does
33 // this by way of gin. Non-builtin modules are downloaded by way of 33 // this by way of gin. Non-builtin modules are downloaded by way of
34 // ResourceFetchers. 34 // ResourceFetchers.
35 class WebUIMojoContextState : public gin::ModuleRegistryObserver { 35 class WebUIMojoContextState : public gin::ModuleRegistryObserver {
36 public: 36 public:
37 WebUIMojoContextState(blink::WebFrame* frame, 37 WebUIMojoContextState(blink::WebFrame* frame,
38 v8::Handle<v8::Context> context); 38 v8::Handle<v8::Context> context);
39 virtual ~WebUIMojoContextState(); 39 virtual ~WebUIMojoContextState();
40 40
41 // Called once the mojo::Handle is available. 41 // Called once the mojo::Handle is available.
42 void SetHandle(mojo::ScopedHandle handle); 42 void SetHandle(mojo::ScopedMessagePipeHandle handle);
43 43
44 // Returns true if at least one module was added. 44 // Returns true if at least one module was added.
45 bool module_added() const { return module_added_; } 45 bool module_added() const { return module_added_; }
46 46
47 private: 47 private:
48 class Loader; 48 class Loader;
49 49
50 // Invokes FetchModule() for any modules that have not already been 50 // Invokes FetchModule() for any modules that have not already been
51 // downloaded. 51 // downloaded.
52 void FetchModules(const std::vector<std::string>& ids); 52 void FetchModules(const std::vector<std::string>& ids);
(...skipping 25 matching lines...) Expand all
78 78
79 // Set of modules we've fetched script from. 79 // Set of modules we've fetched script from.
80 std::set<std::string> fetched_modules_; 80 std::set<std::string> fetched_modules_;
81 81
82 DISALLOW_COPY_AND_ASSIGN(WebUIMojoContextState); 82 DISALLOW_COPY_AND_ASSIGN(WebUIMojoContextState);
83 }; 83 };
84 84
85 } // namespace content 85 } // namespace content
86 86
87 #endif // CONTENT_RENDERER_WEB_UI_MOJO_CONTEXT_STATE_H_ 87 #endif // CONTENT_RENDERER_WEB_UI_MOJO_CONTEXT_STATE_H_
OLDNEW
« no previous file with comments | « content/renderer/web_ui_mojo.cc ('k') | content/renderer/web_ui_mojo_context_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698