OLD | NEW |
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 #ifndef CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 // An identifier for an event dispatch that is used to prevent double dispatch | 158 // An identifier for an event dispatch that is used to prevent double dispatch |
159 // due to race conditions between the direct and lazy dispatch paths. | 159 // due to race conditions between the direct and lazy dispatch paths. |
160 typedef std::pair<const content::BrowserContext*, std::string> | 160 typedef std::pair<const content::BrowserContext*, std::string> |
161 EventDispatchIdentifier; | 161 EventDispatchIdentifier; |
162 | 162 |
163 // Records an event notification in the extension activity log. Can be | 163 // Records an event notification in the extension activity log. Can be |
164 // called from any thread. | 164 // called from any thread. |
165 static void LogExtensionEventMessage(void* profile_id, | 165 static void LogExtensionEventMessage(void* profile_id, |
166 const std::string& extension_id, | 166 const std::string& extension_id, |
167 const std::string& event_name, | 167 const std::string& event_name, |
168 scoped_ptr<ListValue> event_args); | 168 scoped_ptr<base::ListValue> event_args); |
169 | 169 |
170 // TODO(gdk): Document this. | 170 // TODO(gdk): Document this. |
171 static void DispatchExtensionMessage( | 171 static void DispatchExtensionMessage( |
172 IPC::Sender* ipc_sender, | 172 IPC::Sender* ipc_sender, |
173 void* profile_id, | 173 void* profile_id, |
174 const std::string& extension_id, | 174 const std::string& extension_id, |
175 const std::string& event_name, | 175 const std::string& event_name, |
176 base::ListValue* event_args, | 176 base::ListValue* event_args, |
177 UserGestureState user_gesture, | 177 UserGestureState user_gesture, |
178 const extensions::EventFilteringInfo& info); | 178 const extensions::EventFilteringInfo& info); |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 EventListenerInfo(const std::string& event_name, | 334 EventListenerInfo(const std::string& event_name, |
335 const std::string& extension_id); | 335 const std::string& extension_id); |
336 | 336 |
337 const std::string event_name; | 337 const std::string event_name; |
338 const std::string extension_id; | 338 const std::string extension_id; |
339 }; | 339 }; |
340 | 340 |
341 } // namespace extensions | 341 } // namespace extensions |
342 | 342 |
343 #endif // CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_ | 343 #endif // CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_ |
OLD | NEW |