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); |