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

Unified Diff: content/renderer/web_ui_mojo_context_state.h

Issue 365513002: Port identity_internals to mojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT for commit Created 6 years, 5 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 | « content/public/browser/web_contents_observer.h ('k') | content/renderer/web_ui_mojo_context_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/web_ui_mojo_context_state.h
diff --git a/content/renderer/web_ui_mojo_context_state.h b/content/renderer/web_ui_mojo_context_state.h
index e4eb0a4ed58dd2fabe8f783ba655bffafaa9d7bc..beaa665aa74552ee802656c6f07fd4699fad3ffb 100644
--- a/content/renderer/web_ui_mojo_context_state.h
+++ b/content/renderer/web_ui_mojo_context_state.h
@@ -10,6 +10,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
+#include "base/memory/weak_ptr.h"
#include "gin/modules/module_registry_observer.h"
#include "mojo/public/cpp/system/core.h"
#include "v8/include/v8.h"
@@ -21,6 +22,7 @@ class WebURLResponse;
namespace gin {
class ContextHolder;
+class Runner;
struct PendingModule;
}
@@ -32,7 +34,9 @@ class WebUIRunner;
// WebUIMojoContextState manages the modules needed for mojo bindings. It does
// this by way of gin. Non-builtin modules are downloaded by way of
// ResourceFetchers.
-class WebUIMojoContextState : public gin::ModuleRegistryObserver {
+class WebUIMojoContextState
+ : public gin::ModuleRegistryObserver,
+ public base::SupportsWeakPtr<WebUIMojoContextState> {
public:
WebUIMojoContextState(blink::WebFrame* frame,
v8::Handle<v8::Context> context);
@@ -47,6 +51,11 @@ class WebUIMojoContextState : public gin::ModuleRegistryObserver {
private:
class Loader;
+ // The implementation of the 'main' module. Calls the closure passed in and
+ // then notifies our RenderView that we've run the main closure.
+ void RunMain(mojo::ScopedMessagePipeHandle* handle,
+ v8::Handle<v8::Value> module);
+
// Invokes FetchModule() for any modules that have not already been
// downloaded.
void FetchModules(const std::vector<std::string>& ids);
« no previous file with comments | « content/public/browser/web_contents_observer.h ('k') | content/renderer/web_ui_mojo_context_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698