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> |
11 | 11 |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/memory/linked_ptr.h" | 13 #include "base/memory/linked_ptr.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #include "chrome/browser/extensions/event_listener_map.h" | 16 #include "chrome/browser/extensions/event_listener_map.h" |
17 #include "chrome/common/extensions/event_filtering_info.h" | 17 #include "chrome/common/extensions/event_filtering_info.h" |
18 #include "content/public/browser/notification_observer.h" | 18 #include "content/public/browser/notification_observer.h" |
19 #include "content/public/browser/notification_registrar.h" | 19 #include "content/public/browser/notification_registrar.h" |
20 #include "ipc/ipc_sender.h" | 20 #include "ipc/ipc_sender.h" |
21 | 21 |
22 class GURL; | 22 class GURL; |
23 class ExtensionHost; | |
24 class ExtensionDevToolsManager; | 23 class ExtensionDevToolsManager; |
25 class Profile; | 24 class Profile; |
26 | 25 |
27 namespace content { | 26 namespace content { |
28 class RenderProcessHost; | 27 class RenderProcessHost; |
29 } | 28 } |
30 | 29 |
31 namespace extensions { | 30 namespace extensions { |
32 class Extension; | 31 class Extension; |
| 32 class ExtensionHost; |
| 33 |
33 struct Event; | 34 struct Event; |
34 | 35 |
35 class EventRouter : public content::NotificationObserver, | 36 class EventRouter : public content::NotificationObserver, |
36 public EventListenerMap::Delegate { | 37 public EventListenerMap::Delegate { |
37 public: | 38 public: |
38 // These constants convey the state of our knowledge of whether we're in | 39 // These constants convey the state of our knowledge of whether we're in |
39 // a user-caused gesture as part of DispatchEvent. | 40 // a user-caused gesture as part of DispatchEvent. |
40 enum UserGestureState { | 41 enum UserGestureState { |
41 USER_GESTURE_UNKNOWN = 0, | 42 USER_GESTURE_UNKNOWN = 0, |
42 USER_GESTURE_ENABLED = 1, | 43 USER_GESTURE_ENABLED = 1, |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 Profile* restrict_to_profile, | 276 Profile* restrict_to_profile, |
276 EventRouter::UserGestureState user_gesture, | 277 EventRouter::UserGestureState user_gesture, |
277 const EventFilteringInfo& info); | 278 const EventFilteringInfo& info); |
278 | 279 |
279 ~Event(); | 280 ~Event(); |
280 }; | 281 }; |
281 | 282 |
282 } // namespace extensions | 283 } // namespace extensions |
283 | 284 |
284 #endif // CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_ | 285 #endif // CHROME_BROWSER_EXTENSIONS_EVENT_ROUTER_H_ |
OLD | NEW |