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

Unified Diff: extensions/renderer/api_binding_bridge.h

Issue 2727583004: [Extensions Bindings] Add a registerEventArgumentMassager (Closed)
Patch Set: . Created 3 years, 10 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 | « no previous file | extensions/renderer/api_binding_bridge.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/api_binding_bridge.h
diff --git a/extensions/renderer/api_binding_bridge.h b/extensions/renderer/api_binding_bridge.h
index 3a3fe6497f1c0ec7d9a86626fbb7b556cd6ffc56..30dd71be741fbf4afdb8eb7feb6e51b189135385 100644
--- a/extensions/renderer/api_binding_bridge.h
+++ b/extensions/renderer/api_binding_bridge.h
@@ -18,6 +18,7 @@ class Arguments;
namespace extensions {
class APIBindingHooks;
+class APIEventHandler;
class APIRequestHandler;
class APITypeReferenceMap;
@@ -28,6 +29,7 @@ class APIBindingBridge final : public gin::Wrappable<APIBindingBridge> {
public:
APIBindingBridge(const APITypeReferenceMap* type_refs,
APIRequestHandler* request_handler,
+ APIEventHandler* event_handler,
APIBindingHooks* hooks,
v8::Local<v8::Context> context,
v8::Local<v8::Value> api_object,
@@ -60,12 +62,21 @@ class APIBindingBridge final : public gin::Wrappable<APIBindingBridge> {
const std::string& name,
const std::vector<v8::Local<v8::Value>>& request_args);
+ // A handler to register an argument massager for a specific event.
+ // Replacement for event_bindings.registerArgumentMassager.
+ void RegisterEventArgumentMassager(gin::Arguments* arguments,
+ const std::string& event_name,
+ v8::Local<v8::Function> massager);
+
// Type references. Guaranteed to outlive this object.
const APITypeReferenceMap* type_refs_;
// The request handler. Guaranteed to outlive this object.
APIRequestHandler* request_handler_;
+ // The event handler. Guaranteed to outlive this object.
+ APIEventHandler* event_handler_;
+
// The hooks associated with this API. Guaranteed to outlive this object.
APIBindingHooks* hooks_;
« no previous file with comments | « no previous file | extensions/renderer/api_binding_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698