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

Unified Diff: extensions/renderer/native_extension_bindings_system.cc

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/native_extension_bindings_system.cc
diff --git a/extensions/renderer/native_extension_bindings_system.cc b/extensions/renderer/native_extension_bindings_system.cc
index 10e7f08100cb61d275751d1c6180687e01605a70..9de510154a26493fcc32e234206730698b27d623 100644
--- a/extensions/renderer/native_extension_bindings_system.cc
+++ b/extensions/renderer/native_extension_bindings_system.cc
@@ -488,6 +488,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