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

Unified Diff: extensions/renderer/module_system.h

Issue 2575173002: [Extensions Bindings] Add a bridge to use current custom bindings (Closed)
Patch Set: . Created 4 years 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 | « extensions/renderer/api_request_handler.cc ('k') | extensions/renderer/module_system.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/module_system.h
diff --git a/extensions/renderer/module_system.h b/extensions/renderer/module_system.h
index 75f581970059b913b14e44bf077189e2f9cb8d89..c15ffb098e61cf7b23fd20fa3a32f58883f722f1 100644
--- a/extensions/renderer/module_system.h
+++ b/extensions/renderer/module_system.h
@@ -153,6 +153,13 @@ class ModuleSystem : public ObjectBackedNativeHandler,
exception_handler_ = std::move(handler);
}
+ // Called when a native binding is created in order to run any custom binding
+ // code to set up various hooks.
+ // TODO(devlin): We can get rid of this once we convert all our custom
+ // bindings.
+ void OnNativeBindingCreated(const std::string& api_name,
+ v8::Local<v8::Value> api_bridge_value);
+
protected:
friend class ModuleSystemTestEnvironment;
friend class ScriptContext;
@@ -209,6 +216,9 @@ class ModuleSystem : public ObjectBackedNativeHandler,
// Loads and runs a Javascript module.
v8::Local<v8::Value> LoadModule(const std::string& module_name);
+ v8::Local<v8::Value> LoadModuleWithNativeAPIBridge(
+ const std::string& module_name,
+ v8::Local<v8::Value> api_object);
// Invoked when a module is loaded in response to a requireAsync call.
// Resolves |resolver| with |value|.
« no previous file with comments | « extensions/renderer/api_request_handler.cc ('k') | extensions/renderer/module_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698