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

Unified Diff: extensions/renderer/native_extension_bindings_system.cc

Issue 2940893002: [Extensions] Pass EventFilteringInfo directly in DispatchEvent message (Closed)
Patch Set: . 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/native_extension_bindings_system.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4c9ab439b96a78f2a11c6cf09cf015fdeec35c97..9431880163016ee5292fd263939d6d19712bab33 100644
--- a/extensions/renderer/native_extension_bindings_system.cc
+++ b/extensions/renderer/native_extension_bindings_system.cc
@@ -481,15 +481,13 @@ void NativeExtensionBindingsSystem::UpdateBindingsForContext(
void NativeExtensionBindingsSystem::DispatchEventInContext(
const std::string& event_name,
const base::ListValue* event_args,
- const base::DictionaryValue* filtering_info_dict,
+ const EventFilteringInfo* filtering_info,
ScriptContext* context) {
v8::HandleScope handle_scope(context->isolate());
v8::Context::Scope context_scope(context->v8_context());
- EventFilteringInfo filter;
- if (filtering_info_dict)
- filter = EventFilteringInfo(*filtering_info_dict);
- api_system_.FireEventInContext(event_name, context->v8_context(), *event_args,
- filter);
+ api_system_.FireEventInContext(
+ event_name, context->v8_context(), *event_args,
+ filtering_info ? *filtering_info : EventFilteringInfo());
}
bool NativeExtensionBindingsSystem::HasEventListenerInContext(
« no previous file with comments | « extensions/renderer/native_extension_bindings_system.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698