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

Unified Diff: extensions/renderer/event_bindings.h

Issue 2909673003: [Extensions Bindings] Request JS execution from messaging bindings (Closed)
Patch Set: . Created 3 years, 7 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 f2d1ad77a72c5a5de7b5afb0b0e1a7b6dee7e7e8..ebc5be1e6f2877a6c897e0bf3328d624a40e0f7e 100644
--- a/extensions/renderer/event_bindings.h
+++ b/extensions/renderer/event_bindings.h
@@ -26,6 +26,11 @@ class EventBindings : public ObjectBackedNativeHandler {
explicit EventBindings(ScriptContext* context);
~EventBindings() override;
+ // Returns true if there is a listener for the given |event| in the given
+ // |context|.
+ static bool HasListener(ScriptContext* context,
+ const std::string& event_name);
+
private:
// JavaScript handler which forwards to AttachEvent().
// args[0] forwards to |event_name|.
@@ -70,6 +75,9 @@ class EventBindings : public ObjectBackedNativeHandler {
void MatchAgainstEventFilter(const v8::FunctionCallbackInfo<v8::Value>& args);
+ void AttachUnmanagedEvent(const v8::FunctionCallbackInfo<v8::Value>& args);
+ void DetachUnmanagedEvent(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