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

Unified Diff: extensions/renderer/api_bindings_system.cc

Issue 2563093002: [Extension Bindings] Add JS custom hook support (Closed)
Patch Set: nits 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_bindings_system.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/api_bindings_system.cc
diff --git a/extensions/renderer/api_bindings_system.cc b/extensions/renderer/api_bindings_system.cc
index b9879fbb0968629055b60d4116849dfe7dc2d709..8ab880bb4b3739cba8f9176e179ba3e7349e9d63 100644
--- a/extensions/renderer/api_bindings_system.cc
+++ b/extensions/renderer/api_bindings_system.cc
@@ -19,6 +19,7 @@ APIBindingsSystem::APIBindingsSystem(const binding::RunJSFunction& call_js,
const SendRequestMethod& send_request)
: request_handler_(call_js),
event_handler_(call_js),
+ call_js_(call_js),
get_api_schema_(get_api_schema),
send_request_(send_request) {}
@@ -79,7 +80,7 @@ APIBindingHooks* APIBindingsSystem::GetHooksForAPI(
<< "Hook registration must happen before creating any binding instances.";
std::unique_ptr<APIBindingHooks>& hooks = binding_hooks_[api_name];
if (!hooks)
- hooks = base::MakeUnique<APIBindingHooks>();
+ hooks = base::MakeUnique<APIBindingHooks>(call_js_);
return hooks.get();
}
« no previous file with comments | « extensions/renderer/api_bindings_system.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698