Chromium Code Reviews| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 const std::string& json_args); | 111 const std::string& json_args); |
| 112 | 112 |
| 113 void DispatchEventToExtension(Profile* profile, | 113 void DispatchEventToExtension(Profile* profile, |
| 114 const std::string& extension_id, | 114 const std::string& extension_id, |
| 115 const char* event_name, | 115 const char* event_name, |
| 116 const std::string& json_args); | 116 const std::string& json_args); |
| 117 | 117 |
| 118 void DispatchEventWithTab(Profile* profile, | 118 void DispatchEventWithTab(Profile* profile, |
| 119 const std::string& extension_id, | 119 const std::string& extension_id, |
| 120 const char* event_name, | 120 const char* event_name, |
| 121 const TabContents* tab_contents); | 121 const TabContents* tab_contents, |
| 122 bool foreground); | |
|
sky
2011/06/10 14:58:59
foreground -> active
Yoyo Zhou
2011/06/10 18:04:01
Done here and elsewhere.
| |
| 122 | 123 |
| 123 void DispatchSimpleBrowserEvent(Profile* profile, | 124 void DispatchSimpleBrowserEvent(Profile* profile, |
| 124 const int window_id, | 125 const int window_id, |
| 125 const char* event_name); | 126 const char* event_name); |
| 126 | 127 |
| 127 // Packages |changed_properties| as a tab updated event for the tab |contents| | 128 // Packages |changed_properties| as a tab updated event for the tab |contents| |
| 128 // and dispatches the event to the extension. | 129 // and dispatches the event to the extension. |
| 129 void DispatchTabUpdatedEvent(TabContents* contents, | 130 void DispatchTabUpdatedEvent(TabContents* contents, |
| 130 DictionaryValue* changed_properties); | 131 DictionaryValue* changed_properties); |
| 131 | 132 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 200 int focused_window_id_; | 201 int focused_window_id_; |
| 201 | 202 |
| 202 // The main profile (non-OTR) profile which will be used to send events not | 203 // The main profile (non-OTR) profile which will be used to send events not |
| 203 // associated with any browser. | 204 // associated with any browser. |
| 204 Profile* profile_; | 205 Profile* profile_; |
| 205 | 206 |
| 206 DISALLOW_COPY_AND_ASSIGN(ExtensionBrowserEventRouter); | 207 DISALLOW_COPY_AND_ASSIGN(ExtensionBrowserEventRouter); |
| 207 }; | 208 }; |
| 208 | 209 |
| 209 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_ | 210 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_ |
| OLD | NEW |