OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_EXTENSION_BROWSER_EVENT_ROUTER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 const std::string& page_action_id, | 85 const std::string& page_action_id, |
86 int tab_id, | 86 int tab_id, |
87 const std::string& url, | 87 const std::string& url, |
88 int button); | 88 int button); |
89 // Browser Actions execute event. | 89 // Browser Actions execute event. |
90 void BrowserActionExecuted(Profile* profile, | 90 void BrowserActionExecuted(Profile* profile, |
91 const std::string& extension_id, | 91 const std::string& extension_id, |
92 Browser* browser); | 92 Browser* browser); |
93 | 93 |
94 // NotificationObserver. | 94 // NotificationObserver. |
95 virtual void Observe(NotificationType type, | 95 virtual void Observe(int type, |
96 const NotificationSource& source, | 96 const NotificationSource& source, |
97 const NotificationDetails& details); | 97 const NotificationDetails& details); |
98 private: | 98 private: |
99 // "Synthetic" event. Called from TabInsertedAt if new tab is detected. | 99 // "Synthetic" event. Called from TabInsertedAt if new tab is detected. |
100 void TabCreatedAt(TabContents* contents, int index, bool active); | 100 void TabCreatedAt(TabContents* contents, int index, bool active); |
101 | 101 |
102 // Internal processing of tab updated events. Is called by both TabChangedAt | 102 // Internal processing of tab updated events. Is called by both TabChangedAt |
103 // and Observe/NAV_ENTRY_COMMITTED. | 103 // and Observe/NAV_ENTRY_COMMITTED. |
104 void TabUpdated(TabContents* contents, bool did_navigate); | 104 void TabUpdated(TabContents* contents, bool did_navigate); |
105 | 105 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 Profile* focused_profile_; | 210 Profile* focused_profile_; |
211 | 211 |
212 // The currently focused window. We keep this so as to avoid sending multiple | 212 // The currently focused window. We keep this so as to avoid sending multiple |
213 // windows.onFocusChanged events with the same windowId. | 213 // windows.onFocusChanged events with the same windowId. |
214 int focused_window_id_; | 214 int focused_window_id_; |
215 | 215 |
216 DISALLOW_COPY_AND_ASSIGN(ExtensionBrowserEventRouter); | 216 DISALLOW_COPY_AND_ASSIGN(ExtensionBrowserEventRouter); |
217 }; | 217 }; |
218 | 218 |
219 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_ | 219 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_ |
OLD | NEW |