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

Unified Diff: extensions/renderer/event_bindings.h

Issue 2909673003: [Extensions Bindings] Request JS execution from messaging bindings (Closed)
Patch Set: lazyboy's 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
« no previous file with comments | « extensions/renderer/dispatcher.h ('k') | extensions/renderer/event_bindings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/event_bindings.h
diff --git a/extensions/renderer/event_bindings.h b/extensions/renderer/event_bindings.h
index 72bb7f6d6674468ad0131414a37faed8f6817810..02f0bbdb435144c9e438f115009440c489748e76 100644
--- a/extensions/renderer/event_bindings.h
+++ b/extensions/renderer/event_bindings.h
@@ -30,6 +30,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|.
@@ -74,6 +79,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);
« no previous file with comments | « extensions/renderer/dispatcher.h ('k') | extensions/renderer/event_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698