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

Side by Side Diff: extensions/browser/event_router.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 unified diff | Download patch
« no previous file with comments | « no previous file | extensions/common/event_filtering_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/browser/event_router.h" 5 #include "extensions/browser/event_router.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 const EventFilteringInfo& info) { 84 const EventFilteringInfo& info) {
85 NotifyEventDispatched(browser_context_id, extension_id, event_name, 85 NotifyEventDispatched(browser_context_id, extension_id, event_name,
86 *event_args); 86 *event_args);
87 87
88 ExtensionMsg_DispatchEvent_Params params; 88 ExtensionMsg_DispatchEvent_Params params;
89 params.worker_thread_id = worker_thread_id; 89 params.worker_thread_id = worker_thread_id;
90 params.extension_id = extension_id; 90 params.extension_id = extension_id;
91 params.event_name = event_name; 91 params.event_name = event_name;
92 params.event_id = event_id; 92 params.event_id = event_id;
93 params.is_user_gesture = user_gesture == USER_GESTURE_ENABLED; 93 params.is_user_gesture = user_gesture == USER_GESTURE_ENABLED;
94 params.filtering_info.Swap(info.AsValue().get()); 94 params.filtering_info = info;
95 95
96 ipc_sender->Send(new ExtensionMsg_DispatchEvent(params, *event_args)); 96 ipc_sender->Send(new ExtensionMsg_DispatchEvent(params, *event_args));
97 } 97 }
98 98
99 // static 99 // static
100 EventRouter* EventRouter::Get(content::BrowserContext* browser_context) { 100 EventRouter* EventRouter::Get(content::BrowserContext* browser_context) {
101 return EventRouterFactory::GetForBrowserContext(browser_context); 101 return EventRouterFactory::GetForBrowserContext(browser_context);
102 } 102 }
103 103
104 // static 104 // static
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 const std::string& extension_id, 907 const std::string& extension_id,
908 const GURL& listener_url, 908 const GURL& listener_url,
909 content::BrowserContext* browser_context) 909 content::BrowserContext* browser_context)
910 : event_name(event_name), 910 : event_name(event_name),
911 extension_id(extension_id), 911 extension_id(extension_id),
912 listener_url(listener_url), 912 listener_url(listener_url),
913 browser_context(browser_context) { 913 browser_context(browser_context) {
914 } 914 }
915 915
916 } // namespace extensions 916 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | extensions/common/event_filtering_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698