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

Unified Diff: extensions/renderer/native_extension_bindings_system.cc

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
Index: extensions/renderer/native_extension_bindings_system.cc
diff --git a/extensions/renderer/native_extension_bindings_system.cc b/extensions/renderer/native_extension_bindings_system.cc
index b5226128fe67bc04f61abda1dcb72be96e5f2d05..4c9ab439b96a78f2a11c6cf09cf015fdeec35c97 100644
--- a/extensions/renderer/native_extension_bindings_system.cc
+++ b/extensions/renderer/native_extension_bindings_system.cc
@@ -492,6 +492,14 @@ void NativeExtensionBindingsSystem::DispatchEventInContext(
filter);
}
+bool NativeExtensionBindingsSystem::HasEventListenerInContext(
+ const std::string& event_name,
+ ScriptContext* context) {
+ v8::HandleScope handle_scope(context->isolate());
+ return api_system_.event_handler()->HasListenerForEvent(
+ event_name, context->v8_context());
+}
+
void NativeExtensionBindingsSystem::HandleResponse(
int request_id,
bool success,

Powered by Google App Engine
This is Rietveld 408576698