Chromium Code Reviews| 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 EXTENSIONS_BROWSER_EVENT_ROUTER_H_ | 5 #ifndef EXTENSIONS_BROWSER_EVENT_ROUTER_H_ |
| 6 #define EXTENSIONS_BROWSER_EVENT_ROUTER_H_ | 6 #define EXTENSIONS_BROWSER_EVENT_ROUTER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 315 EventRouter::UserGestureState user_gesture; | 315 EventRouter::UserGestureState user_gesture; |
| 316 | 316 |
| 317 // Extra information used to filter which events are sent to the listener. | 317 // Extra information used to filter which events are sent to the listener. |
| 318 EventFilteringInfo filter_info; | 318 EventFilteringInfo filter_info; |
| 319 | 319 |
| 320 // If specified, this is called before dispatching an event to each | 320 // If specified, this is called before dispatching an event to each |
| 321 // extension. The third argument is a mutable reference to event_args, | 321 // extension. The third argument is a mutable reference to event_args, |
| 322 // allowing the caller to provide different arguments depending on the | 322 // allowing the caller to provide different arguments depending on the |
| 323 // extension and profile. This is guaranteed to be called synchronously with | 323 // extension and profile. This is guaranteed to be called synchronously with |
| 324 // DispatchEvent, so callers don't need to worry about lifetime. | 324 // DispatchEvent, so callers don't need to worry about lifetime. |
| 325 // | |
| 326 // NOTE: the Extension argument to this may be NULL if this event if it's | |
|
Ken Rockot(use gerrit already)
2014/07/18 22:33:40
nit: in/on/for* (not if) this event?
not at google - send to devlin
2014/07/18 23:28:35
Done. I had way too many words in here.
| |
| 327 // possible for this event to be dispatched to non-extension processes, like | |
| 328 // WebUI. | |
| 325 WillDispatchCallback will_dispatch_callback; | 329 WillDispatchCallback will_dispatch_callback; |
| 326 | 330 |
| 327 // If true, this event will always be dispatched to ephemeral apps, regardless | 331 // If true, this event will always be dispatched to ephemeral apps, regardless |
| 328 // of whether they are running or inactive. Defaults to false. | 332 // of whether they are running or inactive. Defaults to false. |
| 329 // Most events can only be dispatched to ephemeral apps that are already | 333 // Most events can only be dispatched to ephemeral apps that are already |
| 330 // running. Cached ephemeral apps are inactive until launched by the user. | 334 // running. Cached ephemeral apps are inactive until launched by the user. |
| 331 bool can_load_ephemeral_apps; | 335 bool can_load_ephemeral_apps; |
| 332 | 336 |
| 333 Event(const std::string& event_name, | 337 Event(const std::string& event_name, |
| 334 scoped_ptr<base::ListValue> event_args); | 338 scoped_ptr<base::ListValue> event_args); |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 359 // "webRequest.onCompleted/123". | 363 // "webRequest.onCompleted/123". |
| 360 const std::string event_name; | 364 const std::string event_name; |
| 361 | 365 |
| 362 const std::string extension_id; | 366 const std::string extension_id; |
| 363 content::BrowserContext* browser_context; | 367 content::BrowserContext* browser_context; |
| 364 }; | 368 }; |
| 365 | 369 |
| 366 } // namespace extensions | 370 } // namespace extensions |
| 367 | 371 |
| 368 #endif // EXTENSIONS_BROWSER_EVENT_ROUTER_H_ | 372 #endif // EXTENSIONS_BROWSER_EVENT_ROUTER_H_ |
| OLD | NEW |