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: remove extra '.' 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 72bb7f6d6674468ad0131414a37faed8f6817810..f2ad32f8d790b9d75841d9fbe6224bada9a1a51b 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 {
@@ -30,6 +31,14 @@ class EventBindings : public ObjectBackedNativeHandler {
explicit EventBindings(ScriptContext* context);
~EventBindings() override;
+ // 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|.
@@ -72,8 +81,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);
-
std::unique_ptr<EventMatcher> ParseEventMatcher(
std::unique_ptr<base::DictionaryValue> filter);

Powered by Google App Engine
This is Rietveld 408576698