| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 void Observe(NotificationType type, | 95 virtual void Observe(NotificationType 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 foreground); | 100 void TabCreatedAt(TabContents* contents, int index, bool foreground); |
| 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 |
| 106 // Packages |changed_properties| as a tab updated event for the tab |contents| | 106 // Packages |changed_properties| as a tab updated event for the tab |contents| |
| 107 // and dispatches the event to the extension. | 107 // and dispatches the event to the extension. |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 int focused_window_id_; | 183 int focused_window_id_; |
| 184 | 184 |
| 185 // The main profile (non-OTR) profile which will be used to send events not | 185 // The main profile (non-OTR) profile which will be used to send events not |
| 186 // associated with any browser. | 186 // associated with any browser. |
| 187 Profile* profile_; | 187 Profile* profile_; |
| 188 | 188 |
| 189 DISALLOW_COPY_AND_ASSIGN(ExtensionBrowserEventRouter); | 189 DISALLOW_COPY_AND_ASSIGN(ExtensionBrowserEventRouter); |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_ | 192 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_ |
| OLD | NEW |