| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 // | 325 // |
| 326 // NOTE: the Extension argument to this may be NULL because it's possible for | 326 // NOTE: the Extension argument to this may be NULL because it's possible for |
| 327 // this event to be dispatched to non-extension processes, like WebUI. | 327 // this event to be dispatched to non-extension processes, like WebUI. |
| 328 WillDispatchCallback will_dispatch_callback; | 328 WillDispatchCallback will_dispatch_callback; |
| 329 | 329 |
| 330 // If true, this event will always be dispatched to ephemeral apps, regardless | |
| 331 // of whether they are running or inactive. Defaults to false. | |
| 332 // Most events can only be dispatched to ephemeral apps that are already | |
| 333 // running. Cached ephemeral apps are inactive until launched by the user. | |
| 334 bool can_load_ephemeral_apps; | |
| 335 | |
| 336 Event(const std::string& event_name, | 330 Event(const std::string& event_name, |
| 337 scoped_ptr<base::ListValue> event_args); | 331 scoped_ptr<base::ListValue> event_args); |
| 338 | 332 |
| 339 Event(const std::string& event_name, | 333 Event(const std::string& event_name, |
| 340 scoped_ptr<base::ListValue> event_args, | 334 scoped_ptr<base::ListValue> event_args, |
| 341 content::BrowserContext* restrict_to_browser_context); | 335 content::BrowserContext* restrict_to_browser_context); |
| 342 | 336 |
| 343 Event(const std::string& event_name, | 337 Event(const std::string& event_name, |
| 344 scoped_ptr<base::ListValue> event_args, | 338 scoped_ptr<base::ListValue> event_args, |
| 345 content::BrowserContext* restrict_to_browser_context, | 339 content::BrowserContext* restrict_to_browser_context, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 362 // "webRequest.onCompleted/123". | 356 // "webRequest.onCompleted/123". |
| 363 const std::string event_name; | 357 const std::string event_name; |
| 364 | 358 |
| 365 const std::string extension_id; | 359 const std::string extension_id; |
| 366 content::BrowserContext* browser_context; | 360 content::BrowserContext* browser_context; |
| 367 }; | 361 }; |
| 368 | 362 |
| 369 } // namespace extensions | 363 } // namespace extensions |
| 370 | 364 |
| 371 #endif // EXTENSIONS_BROWSER_EVENT_ROUTER_H_ | 365 #endif // EXTENSIONS_BROWSER_EVENT_ROUTER_H_ |
| OLD | NEW |