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

Unified Diff: extensions/renderer/api_binding.h

Issue 2552343006: [Extensions Binding] Allow for registering custom hooks (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/BUILD.gn ('k') | extensions/renderer/api_binding.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/api_binding.h
diff --git a/extensions/renderer/api_binding.h b/extensions/renderer/api_binding.h
index af680534a7ecd3d318422768d5450c9eef021b33..464ec86efb15e1f860f0df7287cb376c5c839630 100644
--- a/extensions/renderer/api_binding.h
+++ b/extensions/renderer/api_binding.h
@@ -25,6 +25,7 @@ class Arguments;
}
namespace extensions {
+class APIBindingHooks;
class APIEventHandler;
// A class that vends v8::Objects for extension APIs. These APIs have function
@@ -62,6 +63,7 @@ class APIBinding {
const base::ListValue* type_definitions,
const base::ListValue* event_definitions,
const APIMethodCallback& callback,
+ std::unique_ptr<APIBindingHooks> binding_hooks,
ArgumentSpec::RefMap* type_refs);
~APIBinding();
@@ -93,6 +95,10 @@ class APIBinding {
// The callback to use when an API is invoked with valid arguments.
APIMethodCallback method_callback_;
+ // The registered hooks for this API. Null if there are no registered custom
+ // hooks.
+ std::unique_ptr<APIBindingHooks> binding_hooks_;
+
// The reference map for all known types; required to outlive this object.
const ArgumentSpec::RefMap* type_refs_;
« no previous file with comments | « extensions/renderer/BUILD.gn ('k') | extensions/renderer/api_binding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698