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

Unified Diff: extensions/renderer/api_event_handler.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 | « extensions/renderer/api_bindings_system.h ('k') | extensions/renderer/api_event_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/api_event_handler.h
diff --git a/extensions/renderer/api_event_handler.h b/extensions/renderer/api_event_handler.h
index fbf9b42a7ea742f1accc48e10775af037a6b8e0b..36046c8c23e6a831212f8f0d3b02d6b55ee8b234 100644
--- a/extensions/renderer/api_event_handler.h
+++ b/extensions/renderer/api_event_handler.h
@@ -44,6 +44,15 @@ class APIEventHandler {
v8::Local<v8::Context> context,
const base::ListValue& arguments);
+ // Registers a |function| to serve as an "argument massager" for the given
+ // |event_name|, mutating the original arguments.
+ // The function is called with two arguments: the array of original arguments
+ // being dispatched to the event, and the function to dispatch the event to
+ // listeners.
+ void RegisterArgumentMassager(v8::Local<v8::Context> context,
+ const std::string& event_name,
+ v8::Local<v8::Function> function);
+
// Returns the EventListeners for a given |event_name| and |context|.
size_t GetNumEventListenersForTesting(const std::string& event_name,
v8::Local<v8::Context> context);
« no previous file with comments | « extensions/renderer/api_bindings_system.h ('k') | extensions/renderer/api_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698