| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_API_TABS_TABS_EVENT_ROUTER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_EVENT_ROUTER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_EVENT_ROUTER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_EVENT_ROUTER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 void DispatchSimpleBrowserEvent(Profile* profile, | 98 void DispatchSimpleBrowserEvent(Profile* profile, |
| 99 const int window_id, | 99 const int window_id, |
| 100 const std::string& event_name); | 100 const std::string& event_name); |
| 101 | 101 |
| 102 // Packages |changed_properties| as a tab updated event for the tab |contents| | 102 // Packages |changed_properties| as a tab updated event for the tab |contents| |
| 103 // and dispatches the event to the extension. | 103 // and dispatches the event to the extension. |
| 104 void DispatchTabUpdatedEvent( | 104 void DispatchTabUpdatedEvent( |
| 105 content::WebContents* contents, | 105 content::WebContents* contents, |
| 106 scoped_ptr<base::DictionaryValue> changed_properties); | 106 scoped_ptr<base::DictionaryValue> changed_properties); |
| 107 | 107 |
| 108 // Dispatches an |onZoomChange| event when the tab |contents| is zoomed. |
| 109 void DispatchTabZoomChangeEvent(content::WebContents* contents, |
| 110 double old_zoom_factor, |
| 111 double new_zoom_factor, |
| 112 base::DictionaryValue* zoom_settings); |
| 113 |
| 108 // Register ourselves to receive the various notifications we are interested | 114 // Register ourselves to receive the various notifications we are interested |
| 109 // in for a browser. | 115 // in for a browser. |
| 110 void RegisterForBrowserNotifications(Browser* browser); | 116 void RegisterForBrowserNotifications(Browser* browser); |
| 111 | 117 |
| 112 // Register ourselves to receive the various notifications we are interested | 118 // Register ourselves to receive the various notifications we are interested |
| 113 // in for a tab. | 119 // in for a tab. |
| 114 void RegisterForTabNotifications(content::WebContents* contents); | 120 void RegisterForTabNotifications(content::WebContents* contents); |
| 115 | 121 |
| 116 // Removes notifications added in RegisterForTabNotifications. | 122 // Removes notifications added in RegisterForTabNotifications. |
| 117 void UnregisterForTabNotifications(content::WebContents* contents); | 123 void UnregisterForTabNotifications(content::WebContents* contents); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 168 |
| 163 // The main profile that owns this event router. | 169 // The main profile that owns this event router. |
| 164 Profile* profile_; | 170 Profile* profile_; |
| 165 | 171 |
| 166 DISALLOW_COPY_AND_ASSIGN(TabsEventRouter); | 172 DISALLOW_COPY_AND_ASSIGN(TabsEventRouter); |
| 167 }; | 173 }; |
| 168 | 174 |
| 169 } // namespace extensions | 175 } // namespace extensions |
| 170 | 176 |
| 171 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_EVENT_ROUTER_H_ | 177 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_EVENT_ROUTER_H_ |
| OLD | NEW |