| 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 // If specified, this is called before dispatching an event to each | 330 // If specified, this is called before dispatching an event to each |
| 331 // extension. The third argument is a mutable reference to event_args, | 331 // extension. The third argument is a mutable reference to event_args, |
| 332 // allowing the caller to provide different arguments depending on the | 332 // allowing the caller to provide different arguments depending on the |
| 333 // extension and profile. This is guaranteed to be called synchronously with | 333 // extension and profile. This is guaranteed to be called synchronously with |
| 334 // DispatchEvent, so callers don't need to worry about lifetime. | 334 // DispatchEvent, so callers don't need to worry about lifetime. |
| 335 // | 335 // |
| 336 // NOTE: the Extension argument to this may be NULL because it's possible for | 336 // NOTE: the Extension argument to this may be NULL because it's possible for |
| 337 // this event to be dispatched to non-extension processes, like WebUI. | 337 // this event to be dispatched to non-extension processes, like WebUI. |
| 338 WillDispatchCallback will_dispatch_callback; | 338 WillDispatchCallback will_dispatch_callback; |
| 339 | 339 |
| 340 // If true, this event will always be dispatched to ephemeral apps, regardless | |
| 341 // of whether they are running or inactive. Defaults to false. | |
| 342 // Most events can only be dispatched to ephemeral apps that are already | |
| 343 // running. Cached ephemeral apps are inactive until launched by the user. | |
| 344 bool can_load_ephemeral_apps; | |
| 345 | |
| 346 Event(const std::string& event_name, | 340 Event(const std::string& event_name, |
| 347 scoped_ptr<base::ListValue> event_args); | 341 scoped_ptr<base::ListValue> event_args); |
| 348 | 342 |
| 349 Event(const std::string& event_name, | 343 Event(const std::string& event_name, |
| 350 scoped_ptr<base::ListValue> event_args, | 344 scoped_ptr<base::ListValue> event_args, |
| 351 content::BrowserContext* restrict_to_browser_context); | 345 content::BrowserContext* restrict_to_browser_context); |
| 352 | 346 |
| 353 Event(const std::string& event_name, | 347 Event(const std::string& event_name, |
| 354 scoped_ptr<base::ListValue> event_args, | 348 scoped_ptr<base::ListValue> event_args, |
| 355 content::BrowserContext* restrict_to_browser_context, | 349 content::BrowserContext* restrict_to_browser_context, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 374 const std::string event_name; | 368 const std::string event_name; |
| 375 | 369 |
| 376 const std::string extension_id; | 370 const std::string extension_id; |
| 377 const GURL listener_url; | 371 const GURL listener_url; |
| 378 content::BrowserContext* browser_context; | 372 content::BrowserContext* browser_context; |
| 379 }; | 373 }; |
| 380 | 374 |
| 381 } // namespace extensions | 375 } // namespace extensions |
| 382 | 376 |
| 383 #endif // EXTENSIONS_BROWSER_EVENT_ROUTER_H_ | 377 #endif // EXTENSIONS_BROWSER_EVENT_ROUTER_H_ |
| OLD | NEW |