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

Unified Diff: extensions/renderer/event_bindings.h

Issue 2924683002: [Extensions Bindings] Avoid passing the event filter to JS (Closed)
Patch Set: rebase Created 3 years, 6 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
Index: extensions/renderer/event_bindings.h
diff --git a/extensions/renderer/event_bindings.h b/extensions/renderer/event_bindings.h
index 02f0bbdb435144c9e438f115009440c489748e76..c43dca3c41dcfb0604799a9f4510a685aacf407d 100644
--- a/extensions/renderer/event_bindings.h
+++ b/extensions/renderer/event_bindings.h
@@ -19,6 +19,7 @@ class Sender;
namespace base {
class DictionaryValue;
+class ListValue;
}
namespace extensions {
@@ -35,6 +36,14 @@ class EventBindings : public ObjectBackedNativeHandler {
static bool HasListener(ScriptContext* context,
const std::string& event_name);
+ // Dispatches the event in the given |context| with the provided
+ // |event_args| and |filtering_info|.
+ static void DispatchEventInContext(
+ const std::string& event_name,
+ const base::ListValue* event_args,
+ const base::DictionaryValue* filtering_info,
+ ScriptContext* context);
+
private:
// JavaScript handler which forwards to AttachEvent().
// args[0] forwards to |event_name|.
@@ -77,8 +86,6 @@ class EventBindings : public ObjectBackedNativeHandler {
// listeners are automatically detached.
void DetachFilteredEvent(int matcher_id, bool is_manual);
- void MatchAgainstEventFilter(const v8::FunctionCallbackInfo<v8::Value>& args);
-
void AttachUnmanagedEvent(const v8::FunctionCallbackInfo<v8::Value>& args);
void DetachUnmanagedEvent(const v8::FunctionCallbackInfo<v8::Value>& args);
« no previous file with comments | « chrome/test/data/extensions/api_test/bindings/event_filter/manifest.json ('k') | extensions/renderer/event_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698