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

Unified Diff: extensions/renderer/api_bindings_system.cc

Issue 2598123002: [Extensions Bindings] Add support for updateArgumentsPreValidate (Closed)
Patch Set: rebase 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
Index: extensions/renderer/api_bindings_system.cc
diff --git a/extensions/renderer/api_bindings_system.cc b/extensions/renderer/api_bindings_system.cc
index 5db72a0235820aedf249eff43f77c974d0ec20b1..9941fcd8c7b3a2ade9b745489be88171408e5940 100644
--- a/extensions/renderer/api_bindings_system.cc
+++ b/extensions/renderer/api_bindings_system.cc
@@ -14,12 +14,15 @@ namespace extensions {
APIBindingsSystem::Request::Request() {}
APIBindingsSystem::Request::~Request() {}
-APIBindingsSystem::APIBindingsSystem(const binding::RunJSFunction& call_js,
- const GetAPISchemaMethod& get_api_schema,
- const SendRequestMethod& send_request)
+APIBindingsSystem::APIBindingsSystem(
+ const binding::RunJSFunction& call_js,
+ const binding::RunJSFunctionSync& call_js_sync,
+ const GetAPISchemaMethod& get_api_schema,
+ const SendRequestMethod& send_request)
: request_handler_(call_js),
event_handler_(call_js),
call_js_(call_js),
+ call_js_sync_(call_js_sync),
get_api_schema_(get_api_schema),
send_request_(send_request) {}
@@ -62,7 +65,7 @@ std::unique_ptr<APIBinding> APIBindingsSystem::CreateNewAPIBinding(
hooks = std::move(iter->second);
binding_hooks_.erase(iter);
} else {
- hooks = base::MakeUnique<APIBindingHooks>(call_js_);
+ hooks = base::MakeUnique<APIBindingHooks>(call_js_sync_);
}
return base::MakeUnique<APIBinding>(
@@ -88,7 +91,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>(call_js_);
+ hooks = base::MakeUnique<APIBindingHooks>(call_js_sync_);
return hooks.get();
}

Powered by Google App Engine
This is Rietveld 408576698