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

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
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());
lazyboy 2017/06/15 17:12:23 Is there a reason FireEventInContext doesn't take
Devlin 2017/06/15 18:01:06 Nope, it probably should. I noticed that too, and
lazyboy 2017/06/15 18:06:43 Separate CL sounds good! Thanks.
}
bool NativeExtensionBindingsSystem::HasEventListenerInContext(

Powered by Google App Engine
This is Rietveld 408576698