| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 void TabDetachedAt(TabContents* contents, int index); | 45 void TabDetachedAt(TabContents* contents, int index); |
| 46 void TabSelectedAt(TabContents* old_contents, | 46 void TabSelectedAt(TabContents* old_contents, |
| 47 TabContents* new_contents, | 47 TabContents* new_contents, |
| 48 int index, | 48 int index, |
| 49 bool user_gesture); | 49 bool user_gesture); |
| 50 void TabMoved(TabContents* contents, int from_index, int to_index, | 50 void TabMoved(TabContents* contents, int from_index, int to_index, |
| 51 bool pinned_state_changed); | 51 bool pinned_state_changed); |
| 52 void TabChangedAt(TabContents* contents, int index, bool loading_only); | 52 void TabChangedAt(TabContents* contents, int index, bool loading_only); |
| 53 void TabStripEmpty(); | 53 void TabStripEmpty(); |
| 54 | 54 |
| 55 // PageActions. | 55 // Page Action execute event. |
| 56 void PageActionExecuted(Profile* profile, | 56 void PageActionExecuted(Profile* profile, |
| 57 const std::string& extension_id, | 57 const std::string& extension_id, |
| 58 const std::string& page_action_id, | 58 const std::string& page_action_id, |
| 59 int tab_id, | 59 int tab_id, |
| 60 const std::string& url, | 60 const std::string& url, |
| 61 int button); | 61 int button); |
| 62 // Browser Actions execute event. |
| 63 void BrowserActionExecuted(Profile* profile, |
| 64 const std::string& extension_id, |
| 65 int window_id); |
| 62 | 66 |
| 63 // NotificationObserver. | 67 // NotificationObserver. |
| 64 void Observe(NotificationType type, | 68 void Observe(NotificationType type, |
| 65 const NotificationSource& source, | 69 const NotificationSource& source, |
| 66 const NotificationDetails& details); | 70 const NotificationDetails& details); |
| 67 private: | 71 private: |
| 68 // "Synthetic" event. Called from TabInsertedAt if new tab is detected. | 72 // "Synthetic" event. Called from TabInsertedAt if new tab is detected. |
| 69 void TabCreatedAt(TabContents* contents, int index, bool foreground); | 73 void TabCreatedAt(TabContents* contents, int index, bool foreground); |
| 70 | 74 |
| 71 // Internal processing of tab updated events. Is called by both TabChangedAt | 75 // Internal processing of tab updated events. Is called by both TabChangedAt |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 126 |
| 123 GURL url_; | 127 GURL url_; |
| 124 }; | 128 }; |
| 125 | 129 |
| 126 std::map<int, TabEntry> tab_entries_; | 130 std::map<int, TabEntry> tab_entries_; |
| 127 | 131 |
| 128 DISALLOW_COPY_AND_ASSIGN(ExtensionBrowserEventRouter); | 132 DISALLOW_COPY_AND_ASSIGN(ExtensionBrowserEventRouter); |
| 129 }; | 133 }; |
| 130 | 134 |
| 131 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_ | 135 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_ |
| OLD | NEW |