OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 namespace extensions { | 44 namespace extensions { |
45 | 45 |
46 // Converts a ZoomMode to its ZoomSettings representation. | 46 // Converts a ZoomMode to its ZoomSettings representation. |
47 void ZoomModeToZoomSettings(ZoomController::ZoomMode zoom_mode, | 47 void ZoomModeToZoomSettings(ZoomController::ZoomMode zoom_mode, |
48 api::tabs::ZoomSettings* zoom_settings); | 48 api::tabs::ZoomSettings* zoom_settings); |
49 | 49 |
50 // Windows | 50 // Windows |
51 class WindowsGetFunction : public ChromeSyncExtensionFunction { | 51 class WindowsGetFunction : public ChromeSyncExtensionFunction { |
52 virtual ~WindowsGetFunction() {} | 52 virtual ~WindowsGetFunction() {} |
53 virtual bool RunSync() OVERRIDE; | 53 virtual bool RunSync() override; |
54 DECLARE_EXTENSION_FUNCTION("windows.get", WINDOWS_GET) | 54 DECLARE_EXTENSION_FUNCTION("windows.get", WINDOWS_GET) |
55 }; | 55 }; |
56 class WindowsGetCurrentFunction : public ChromeSyncExtensionFunction { | 56 class WindowsGetCurrentFunction : public ChromeSyncExtensionFunction { |
57 virtual ~WindowsGetCurrentFunction() {} | 57 virtual ~WindowsGetCurrentFunction() {} |
58 virtual bool RunSync() OVERRIDE; | 58 virtual bool RunSync() override; |
59 DECLARE_EXTENSION_FUNCTION("windows.getCurrent", WINDOWS_GETCURRENT) | 59 DECLARE_EXTENSION_FUNCTION("windows.getCurrent", WINDOWS_GETCURRENT) |
60 }; | 60 }; |
61 class WindowsGetLastFocusedFunction : public ChromeSyncExtensionFunction { | 61 class WindowsGetLastFocusedFunction : public ChromeSyncExtensionFunction { |
62 virtual ~WindowsGetLastFocusedFunction() {} | 62 virtual ~WindowsGetLastFocusedFunction() {} |
63 virtual bool RunSync() OVERRIDE; | 63 virtual bool RunSync() override; |
64 DECLARE_EXTENSION_FUNCTION("windows.getLastFocused", WINDOWS_GETLASTFOCUSED) | 64 DECLARE_EXTENSION_FUNCTION("windows.getLastFocused", WINDOWS_GETLASTFOCUSED) |
65 }; | 65 }; |
66 class WindowsGetAllFunction : public ChromeSyncExtensionFunction { | 66 class WindowsGetAllFunction : public ChromeSyncExtensionFunction { |
67 virtual ~WindowsGetAllFunction() {} | 67 virtual ~WindowsGetAllFunction() {} |
68 virtual bool RunSync() OVERRIDE; | 68 virtual bool RunSync() override; |
69 DECLARE_EXTENSION_FUNCTION("windows.getAll", WINDOWS_GETALL) | 69 DECLARE_EXTENSION_FUNCTION("windows.getAll", WINDOWS_GETALL) |
70 }; | 70 }; |
71 class WindowsCreateFunction : public ChromeSyncExtensionFunction { | 71 class WindowsCreateFunction : public ChromeSyncExtensionFunction { |
72 virtual ~WindowsCreateFunction() {} | 72 virtual ~WindowsCreateFunction() {} |
73 virtual bool RunSync() OVERRIDE; | 73 virtual bool RunSync() override; |
74 // Returns whether the window should be created in incognito mode. | 74 // Returns whether the window should be created in incognito mode. |
75 // |create_data| are the options passed by the extension. It may be NULL. | 75 // |create_data| are the options passed by the extension. It may be NULL. |
76 // |urls| is the list of urls to open. If we are creating an incognito window, | 76 // |urls| is the list of urls to open. If we are creating an incognito window, |
77 // the function will remove these urls which may not be opened in incognito | 77 // the function will remove these urls which may not be opened in incognito |
78 // mode. If window creation leads the browser into an erroneous state, | 78 // mode. If window creation leads the browser into an erroneous state, |
79 // |is_error| is set to true (also, error_ member variable is assigned | 79 // |is_error| is set to true (also, error_ member variable is assigned |
80 // the proper error message). | 80 // the proper error message). |
81 bool ShouldOpenIncognitoWindow( | 81 bool ShouldOpenIncognitoWindow( |
82 const api::windows::Create::Params::CreateData* create_data, | 82 const api::windows::Create::Params::CreateData* create_data, |
83 std::vector<GURL>* urls, | 83 std::vector<GURL>* urls, |
84 bool* is_error); | 84 bool* is_error); |
85 DECLARE_EXTENSION_FUNCTION("windows.create", WINDOWS_CREATE) | 85 DECLARE_EXTENSION_FUNCTION("windows.create", WINDOWS_CREATE) |
86 }; | 86 }; |
87 class WindowsUpdateFunction : public ChromeSyncExtensionFunction { | 87 class WindowsUpdateFunction : public ChromeSyncExtensionFunction { |
88 virtual ~WindowsUpdateFunction() {} | 88 virtual ~WindowsUpdateFunction() {} |
89 virtual bool RunSync() OVERRIDE; | 89 virtual bool RunSync() override; |
90 DECLARE_EXTENSION_FUNCTION("windows.update", WINDOWS_UPDATE) | 90 DECLARE_EXTENSION_FUNCTION("windows.update", WINDOWS_UPDATE) |
91 }; | 91 }; |
92 class WindowsRemoveFunction : public ChromeSyncExtensionFunction { | 92 class WindowsRemoveFunction : public ChromeSyncExtensionFunction { |
93 virtual ~WindowsRemoveFunction() {} | 93 virtual ~WindowsRemoveFunction() {} |
94 virtual bool RunSync() OVERRIDE; | 94 virtual bool RunSync() override; |
95 DECLARE_EXTENSION_FUNCTION("windows.remove", WINDOWS_REMOVE) | 95 DECLARE_EXTENSION_FUNCTION("windows.remove", WINDOWS_REMOVE) |
96 }; | 96 }; |
97 | 97 |
98 // Tabs | 98 // Tabs |
99 class TabsGetFunction : public ChromeSyncExtensionFunction { | 99 class TabsGetFunction : public ChromeSyncExtensionFunction { |
100 virtual ~TabsGetFunction() {} | 100 virtual ~TabsGetFunction() {} |
101 virtual bool RunSync() OVERRIDE; | 101 virtual bool RunSync() override; |
102 DECLARE_EXTENSION_FUNCTION("tabs.get", TABS_GET) | 102 DECLARE_EXTENSION_FUNCTION("tabs.get", TABS_GET) |
103 }; | 103 }; |
104 class TabsGetCurrentFunction : public ChromeSyncExtensionFunction { | 104 class TabsGetCurrentFunction : public ChromeSyncExtensionFunction { |
105 virtual ~TabsGetCurrentFunction() {} | 105 virtual ~TabsGetCurrentFunction() {} |
106 virtual bool RunSync() OVERRIDE; | 106 virtual bool RunSync() override; |
107 DECLARE_EXTENSION_FUNCTION("tabs.getCurrent", TABS_GETCURRENT) | 107 DECLARE_EXTENSION_FUNCTION("tabs.getCurrent", TABS_GETCURRENT) |
108 }; | 108 }; |
109 class TabsGetSelectedFunction : public ChromeSyncExtensionFunction { | 109 class TabsGetSelectedFunction : public ChromeSyncExtensionFunction { |
110 virtual ~TabsGetSelectedFunction() {} | 110 virtual ~TabsGetSelectedFunction() {} |
111 virtual bool RunSync() OVERRIDE; | 111 virtual bool RunSync() override; |
112 DECLARE_EXTENSION_FUNCTION("tabs.getSelected", TABS_GETSELECTED) | 112 DECLARE_EXTENSION_FUNCTION("tabs.getSelected", TABS_GETSELECTED) |
113 }; | 113 }; |
114 class TabsGetAllInWindowFunction : public ChromeSyncExtensionFunction { | 114 class TabsGetAllInWindowFunction : public ChromeSyncExtensionFunction { |
115 virtual ~TabsGetAllInWindowFunction() {} | 115 virtual ~TabsGetAllInWindowFunction() {} |
116 virtual bool RunSync() OVERRIDE; | 116 virtual bool RunSync() override; |
117 DECLARE_EXTENSION_FUNCTION("tabs.getAllInWindow", TABS_GETALLINWINDOW) | 117 DECLARE_EXTENSION_FUNCTION("tabs.getAllInWindow", TABS_GETALLINWINDOW) |
118 }; | 118 }; |
119 class TabsQueryFunction : public ChromeSyncExtensionFunction { | 119 class TabsQueryFunction : public ChromeSyncExtensionFunction { |
120 virtual ~TabsQueryFunction() {} | 120 virtual ~TabsQueryFunction() {} |
121 virtual bool RunSync() OVERRIDE; | 121 virtual bool RunSync() override; |
122 DECLARE_EXTENSION_FUNCTION("tabs.query", TABS_QUERY) | 122 DECLARE_EXTENSION_FUNCTION("tabs.query", TABS_QUERY) |
123 }; | 123 }; |
124 class TabsCreateFunction : public ChromeSyncExtensionFunction { | 124 class TabsCreateFunction : public ChromeSyncExtensionFunction { |
125 virtual ~TabsCreateFunction() {} | 125 virtual ~TabsCreateFunction() {} |
126 virtual bool RunSync() OVERRIDE; | 126 virtual bool RunSync() override; |
127 DECLARE_EXTENSION_FUNCTION("tabs.create", TABS_CREATE) | 127 DECLARE_EXTENSION_FUNCTION("tabs.create", TABS_CREATE) |
128 }; | 128 }; |
129 class TabsDuplicateFunction : public ChromeSyncExtensionFunction { | 129 class TabsDuplicateFunction : public ChromeSyncExtensionFunction { |
130 virtual ~TabsDuplicateFunction() {} | 130 virtual ~TabsDuplicateFunction() {} |
131 virtual bool RunSync() OVERRIDE; | 131 virtual bool RunSync() override; |
132 DECLARE_EXTENSION_FUNCTION("tabs.duplicate", TABS_DUPLICATE) | 132 DECLARE_EXTENSION_FUNCTION("tabs.duplicate", TABS_DUPLICATE) |
133 }; | 133 }; |
134 class TabsHighlightFunction : public ChromeSyncExtensionFunction { | 134 class TabsHighlightFunction : public ChromeSyncExtensionFunction { |
135 virtual ~TabsHighlightFunction() {} | 135 virtual ~TabsHighlightFunction() {} |
136 virtual bool RunSync() OVERRIDE; | 136 virtual bool RunSync() override; |
137 bool HighlightTab(TabStripModel* tabstrip, | 137 bool HighlightTab(TabStripModel* tabstrip, |
138 ui::ListSelectionModel* selection, | 138 ui::ListSelectionModel* selection, |
139 int *active_index, | 139 int *active_index, |
140 int index); | 140 int index); |
141 DECLARE_EXTENSION_FUNCTION("tabs.highlight", TABS_HIGHLIGHT) | 141 DECLARE_EXTENSION_FUNCTION("tabs.highlight", TABS_HIGHLIGHT) |
142 }; | 142 }; |
143 class TabsUpdateFunction : public ChromeAsyncExtensionFunction { | 143 class TabsUpdateFunction : public ChromeAsyncExtensionFunction { |
144 public: | 144 public: |
145 TabsUpdateFunction(); | 145 TabsUpdateFunction(); |
146 | 146 |
147 protected: | 147 protected: |
148 virtual ~TabsUpdateFunction() {} | 148 virtual ~TabsUpdateFunction() {} |
149 virtual bool UpdateURL(const std::string& url, | 149 virtual bool UpdateURL(const std::string& url, |
150 int tab_id, | 150 int tab_id, |
151 bool* is_async); | 151 bool* is_async); |
152 virtual void PopulateResult(); | 152 virtual void PopulateResult(); |
153 | 153 |
154 content::WebContents* web_contents_; | 154 content::WebContents* web_contents_; |
155 | 155 |
156 private: | 156 private: |
157 virtual bool RunAsync() OVERRIDE; | 157 virtual bool RunAsync() override; |
158 void OnExecuteCodeFinished(const std::string& error, | 158 void OnExecuteCodeFinished(const std::string& error, |
159 const GURL& on_url, | 159 const GURL& on_url, |
160 const base::ListValue& script_result); | 160 const base::ListValue& script_result); |
161 | 161 |
162 DECLARE_EXTENSION_FUNCTION("tabs.update", TABS_UPDATE) | 162 DECLARE_EXTENSION_FUNCTION("tabs.update", TABS_UPDATE) |
163 }; | 163 }; |
164 class TabsMoveFunction : public ChromeSyncExtensionFunction { | 164 class TabsMoveFunction : public ChromeSyncExtensionFunction { |
165 virtual ~TabsMoveFunction() {} | 165 virtual ~TabsMoveFunction() {} |
166 virtual bool RunSync() OVERRIDE; | 166 virtual bool RunSync() override; |
167 bool MoveTab(int tab_id, | 167 bool MoveTab(int tab_id, |
168 int* new_index, | 168 int* new_index, |
169 int iteration, | 169 int iteration, |
170 base::ListValue* tab_values, | 170 base::ListValue* tab_values, |
171 int* window_id); | 171 int* window_id); |
172 DECLARE_EXTENSION_FUNCTION("tabs.move", TABS_MOVE) | 172 DECLARE_EXTENSION_FUNCTION("tabs.move", TABS_MOVE) |
173 }; | 173 }; |
174 class TabsReloadFunction : public ChromeSyncExtensionFunction { | 174 class TabsReloadFunction : public ChromeSyncExtensionFunction { |
175 virtual ~TabsReloadFunction() {} | 175 virtual ~TabsReloadFunction() {} |
176 virtual bool RunSync() OVERRIDE; | 176 virtual bool RunSync() override; |
177 DECLARE_EXTENSION_FUNCTION("tabs.reload", TABS_RELOAD) | 177 DECLARE_EXTENSION_FUNCTION("tabs.reload", TABS_RELOAD) |
178 }; | 178 }; |
179 class TabsRemoveFunction : public ChromeSyncExtensionFunction { | 179 class TabsRemoveFunction : public ChromeSyncExtensionFunction { |
180 virtual ~TabsRemoveFunction() {} | 180 virtual ~TabsRemoveFunction() {} |
181 virtual bool RunSync() OVERRIDE; | 181 virtual bool RunSync() override; |
182 bool RemoveTab(int tab_id); | 182 bool RemoveTab(int tab_id); |
183 DECLARE_EXTENSION_FUNCTION("tabs.remove", TABS_REMOVE) | 183 DECLARE_EXTENSION_FUNCTION("tabs.remove", TABS_REMOVE) |
184 }; | 184 }; |
185 class TabsDetectLanguageFunction : public ChromeAsyncExtensionFunction, | 185 class TabsDetectLanguageFunction : public ChromeAsyncExtensionFunction, |
186 public content::NotificationObserver { | 186 public content::NotificationObserver { |
187 private: | 187 private: |
188 virtual ~TabsDetectLanguageFunction() {} | 188 virtual ~TabsDetectLanguageFunction() {} |
189 virtual bool RunAsync() OVERRIDE; | 189 virtual bool RunAsync() override; |
190 | 190 |
191 virtual void Observe(int type, | 191 virtual void Observe(int type, |
192 const content::NotificationSource& source, | 192 const content::NotificationSource& source, |
193 const content::NotificationDetails& details) OVERRIDE; | 193 const content::NotificationDetails& details) override; |
194 void GotLanguage(const std::string& language); | 194 void GotLanguage(const std::string& language); |
195 content::NotificationRegistrar registrar_; | 195 content::NotificationRegistrar registrar_; |
196 DECLARE_EXTENSION_FUNCTION("tabs.detectLanguage", TABS_DETECTLANGUAGE) | 196 DECLARE_EXTENSION_FUNCTION("tabs.detectLanguage", TABS_DETECTLANGUAGE) |
197 }; | 197 }; |
198 class TabsCaptureVisibleTabFunction | 198 class TabsCaptureVisibleTabFunction |
199 : public extensions::CaptureWebContentsFunction { | 199 : public extensions::CaptureWebContentsFunction { |
200 public: | 200 public: |
201 TabsCaptureVisibleTabFunction(); | 201 TabsCaptureVisibleTabFunction(); |
202 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 202 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
203 | 203 |
204 protected: | 204 protected: |
205 virtual ~TabsCaptureVisibleTabFunction() {} | 205 virtual ~TabsCaptureVisibleTabFunction() {} |
206 | 206 |
207 private: | 207 private: |
208 ChromeExtensionFunctionDetails chrome_details_; | 208 ChromeExtensionFunctionDetails chrome_details_; |
209 | 209 |
210 // extensions::CaptureWebContentsFunction: | 210 // extensions::CaptureWebContentsFunction: |
211 virtual bool IsScreenshotEnabled() OVERRIDE; | 211 virtual bool IsScreenshotEnabled() override; |
212 virtual content::WebContents* GetWebContentsForID(int id) OVERRIDE; | 212 virtual content::WebContents* GetWebContentsForID(int id) override; |
213 virtual void OnCaptureFailure(FailureReason reason) OVERRIDE; | 213 virtual void OnCaptureFailure(FailureReason reason) override; |
214 | 214 |
215 DECLARE_EXTENSION_FUNCTION("tabs.captureVisibleTab", TABS_CAPTUREVISIBLETAB) | 215 DECLARE_EXTENSION_FUNCTION("tabs.captureVisibleTab", TABS_CAPTUREVISIBLETAB) |
216 }; | 216 }; |
217 | 217 |
218 // Implement API call tabs.executeScript and tabs.insertCSS. | 218 // Implement API call tabs.executeScript and tabs.insertCSS. |
219 class ExecuteCodeInTabFunction : public ExecuteCodeFunction { | 219 class ExecuteCodeInTabFunction : public ExecuteCodeFunction { |
220 public: | 220 public: |
221 ExecuteCodeInTabFunction(); | 221 ExecuteCodeInTabFunction(); |
222 | 222 |
223 protected: | 223 protected: |
224 virtual ~ExecuteCodeInTabFunction(); | 224 virtual ~ExecuteCodeInTabFunction(); |
225 | 225 |
226 // ExtensionFunction: | 226 // ExtensionFunction: |
227 virtual bool HasPermission() OVERRIDE; | 227 virtual bool HasPermission() override; |
228 | 228 |
229 // Initialize the |execute_tab_id_| and |details_| if they haven't already | 229 // Initialize the |execute_tab_id_| and |details_| if they haven't already |
230 // been. Returns whether initialization was successful. | 230 // been. Returns whether initialization was successful. |
231 virtual bool Init() OVERRIDE; | 231 virtual bool Init() override; |
232 virtual bool CanExecuteScriptOnPage() OVERRIDE; | 232 virtual bool CanExecuteScriptOnPage() override; |
233 virtual ScriptExecutor* GetScriptExecutor() OVERRIDE; | 233 virtual ScriptExecutor* GetScriptExecutor() override; |
234 virtual bool IsWebView() const OVERRIDE; | 234 virtual bool IsWebView() const override; |
235 virtual const GURL& GetWebViewSrc() const OVERRIDE; | 235 virtual const GURL& GetWebViewSrc() const override; |
236 | 236 |
237 private: | 237 private: |
238 const ChromeExtensionFunctionDetails chrome_details_; | 238 const ChromeExtensionFunctionDetails chrome_details_; |
239 | 239 |
240 // Id of tab which executes code. | 240 // Id of tab which executes code. |
241 int execute_tab_id_; | 241 int execute_tab_id_; |
242 }; | 242 }; |
243 | 243 |
244 class TabsExecuteScriptFunction : public ExecuteCodeInTabFunction { | 244 class TabsExecuteScriptFunction : public ExecuteCodeInTabFunction { |
245 protected: | 245 protected: |
246 virtual bool ShouldInsertCSS() const OVERRIDE; | 246 virtual bool ShouldInsertCSS() const override; |
247 | 247 |
248 private: | 248 private: |
249 virtual ~TabsExecuteScriptFunction() {} | 249 virtual ~TabsExecuteScriptFunction() {} |
250 | 250 |
251 virtual void OnExecuteCodeFinished( | 251 virtual void OnExecuteCodeFinished( |
252 const std::string& error, | 252 const std::string& error, |
253 const GURL& on_url, | 253 const GURL& on_url, |
254 const base::ListValue& script_result) OVERRIDE; | 254 const base::ListValue& script_result) override; |
255 | 255 |
256 DECLARE_EXTENSION_FUNCTION("tabs.executeScript", TABS_EXECUTESCRIPT) | 256 DECLARE_EXTENSION_FUNCTION("tabs.executeScript", TABS_EXECUTESCRIPT) |
257 }; | 257 }; |
258 | 258 |
259 class TabsInsertCSSFunction : public ExecuteCodeInTabFunction { | 259 class TabsInsertCSSFunction : public ExecuteCodeInTabFunction { |
260 private: | 260 private: |
261 virtual ~TabsInsertCSSFunction() {} | 261 virtual ~TabsInsertCSSFunction() {} |
262 | 262 |
263 virtual bool ShouldInsertCSS() const OVERRIDE; | 263 virtual bool ShouldInsertCSS() const override; |
264 | 264 |
265 DECLARE_EXTENSION_FUNCTION("tabs.insertCSS", TABS_INSERTCSS) | 265 DECLARE_EXTENSION_FUNCTION("tabs.insertCSS", TABS_INSERTCSS) |
266 }; | 266 }; |
267 | 267 |
268 class ZoomAPIFunction : public ChromeAsyncExtensionFunction { | 268 class ZoomAPIFunction : public ChromeAsyncExtensionFunction { |
269 protected: | 269 protected: |
270 virtual ~ZoomAPIFunction() {} | 270 virtual ~ZoomAPIFunction() {} |
271 | 271 |
272 // Gets the WebContents for |tab_id| if it is specified. Otherwise get the | 272 // Gets the WebContents for |tab_id| if it is specified. Otherwise get the |
273 // WebContents for the active tab in the current window. Calling this function | 273 // WebContents for the active tab in the current window. Calling this function |
274 // may set error_. | 274 // may set error_. |
275 // | 275 // |
276 // TODO(...) many other tabs API functions use similar behavior. There should | 276 // TODO(...) many other tabs API functions use similar behavior. There should |
277 // be a way to share this implementation somehow. | 277 // be a way to share this implementation somehow. |
278 content::WebContents* GetWebContents(int tab_id); | 278 content::WebContents* GetWebContents(int tab_id); |
279 }; | 279 }; |
280 | 280 |
281 class TabsSetZoomFunction : public ZoomAPIFunction { | 281 class TabsSetZoomFunction : public ZoomAPIFunction { |
282 private: | 282 private: |
283 virtual ~TabsSetZoomFunction() {} | 283 virtual ~TabsSetZoomFunction() {} |
284 | 284 |
285 virtual bool RunAsync() OVERRIDE; | 285 virtual bool RunAsync() override; |
286 | 286 |
287 DECLARE_EXTENSION_FUNCTION("tabs.setZoom", TABS_SETZOOM) | 287 DECLARE_EXTENSION_FUNCTION("tabs.setZoom", TABS_SETZOOM) |
288 }; | 288 }; |
289 | 289 |
290 class TabsGetZoomFunction : public ZoomAPIFunction { | 290 class TabsGetZoomFunction : public ZoomAPIFunction { |
291 private: | 291 private: |
292 virtual ~TabsGetZoomFunction() {} | 292 virtual ~TabsGetZoomFunction() {} |
293 | 293 |
294 virtual bool RunAsync() OVERRIDE; | 294 virtual bool RunAsync() override; |
295 | 295 |
296 DECLARE_EXTENSION_FUNCTION("tabs.getZoom", TABS_GETZOOM) | 296 DECLARE_EXTENSION_FUNCTION("tabs.getZoom", TABS_GETZOOM) |
297 }; | 297 }; |
298 | 298 |
299 class TabsSetZoomSettingsFunction : public ZoomAPIFunction { | 299 class TabsSetZoomSettingsFunction : public ZoomAPIFunction { |
300 private: | 300 private: |
301 virtual ~TabsSetZoomSettingsFunction() {} | 301 virtual ~TabsSetZoomSettingsFunction() {} |
302 | 302 |
303 virtual bool RunAsync() OVERRIDE; | 303 virtual bool RunAsync() override; |
304 | 304 |
305 DECLARE_EXTENSION_FUNCTION("tabs.setZoomSettings", TABS_SETZOOMSETTINGS) | 305 DECLARE_EXTENSION_FUNCTION("tabs.setZoomSettings", TABS_SETZOOMSETTINGS) |
306 }; | 306 }; |
307 | 307 |
308 class TabsGetZoomSettingsFunction : public ZoomAPIFunction { | 308 class TabsGetZoomSettingsFunction : public ZoomAPIFunction { |
309 private: | 309 private: |
310 virtual ~TabsGetZoomSettingsFunction() {} | 310 virtual ~TabsGetZoomSettingsFunction() {} |
311 | 311 |
312 virtual bool RunAsync() OVERRIDE; | 312 virtual bool RunAsync() override; |
313 | 313 |
314 DECLARE_EXTENSION_FUNCTION("tabs.getZoomSettings", TABS_GETZOOMSETTINGS) | 314 DECLARE_EXTENSION_FUNCTION("tabs.getZoomSettings", TABS_GETZOOMSETTINGS) |
315 }; | 315 }; |
316 | 316 |
317 } // namespace extensions | 317 } // namespace extensions |
318 | 318 |
319 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ | 319 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ |
OLD | NEW |