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