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 24 matching lines...) Expand all Loading... | |
35 namespace ui { | 35 namespace ui { |
36 class ListSelectionModel; | 36 class ListSelectionModel; |
37 } | 37 } |
38 | 38 |
39 namespace user_prefs { | 39 namespace user_prefs { |
40 class PrefRegistrySyncable; | 40 class PrefRegistrySyncable; |
41 } | 41 } |
42 | 42 |
43 namespace extensions { | 43 namespace extensions { |
44 | 44 |
45 // Converts a ZoomMode to its zoom settings dictionary object representation. | |
46 void ZoomModeToZoomSettings(content::ZoomMode zoom_mode, | |
47 base::DictionaryValue* zoom_settings); | |
not at google - send to devlin
2014/04/09 03:52:11
doesn't seem like this needs to be in the header f
paulmeyer
2014/04/11 03:01:02
Talked about this over IM. I fixed up the function
| |
48 | |
45 // Windows | 49 // Windows |
46 class WindowsGetFunction : public ChromeSyncExtensionFunction { | 50 class WindowsGetFunction : public ChromeSyncExtensionFunction { |
47 virtual ~WindowsGetFunction() {} | 51 virtual ~WindowsGetFunction() {} |
48 virtual bool RunImpl() OVERRIDE; | 52 virtual bool RunImpl() OVERRIDE; |
49 DECLARE_EXTENSION_FUNCTION("windows.get", WINDOWS_GET) | 53 DECLARE_EXTENSION_FUNCTION("windows.get", WINDOWS_GET) |
50 }; | 54 }; |
51 class WindowsGetCurrentFunction : public ChromeSyncExtensionFunction { | 55 class WindowsGetCurrentFunction : public ChromeSyncExtensionFunction { |
52 virtual ~WindowsGetCurrentFunction() {} | 56 virtual ~WindowsGetCurrentFunction() {} |
53 virtual bool RunImpl() OVERRIDE; | 57 virtual bool RunImpl() OVERRIDE; |
54 DECLARE_EXTENSION_FUNCTION("windows.getCurrent", WINDOWS_GETCURRENT) | 58 DECLARE_EXTENSION_FUNCTION("windows.getCurrent", WINDOWS_GETCURRENT) |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
249 | 253 |
250 class TabsInsertCSSFunction : public ExecuteCodeInTabFunction { | 254 class TabsInsertCSSFunction : public ExecuteCodeInTabFunction { |
251 private: | 255 private: |
252 virtual ~TabsInsertCSSFunction() {} | 256 virtual ~TabsInsertCSSFunction() {} |
253 | 257 |
254 virtual bool ShouldInsertCSS() const OVERRIDE; | 258 virtual bool ShouldInsertCSS() const OVERRIDE; |
255 | 259 |
256 DECLARE_EXTENSION_FUNCTION("tabs.insertCSS", TABS_INSERTCSS) | 260 DECLARE_EXTENSION_FUNCTION("tabs.insertCSS", TABS_INSERTCSS) |
257 }; | 261 }; |
258 | 262 |
263 class ZoomAPIFunction : public ChromeAsyncExtensionFunction { | |
264 protected: | |
265 virtual ~ZoomAPIFunction() {} | |
266 | |
267 // Gets the WebContents for |tab_id| if it is specified. Otherwise get the | |
268 // WebContents for the active tab in the current window. | |
269 bool GetWebContents(int* tab_id, content::WebContents** web_contents); | |
not at google - send to devlin
2014/04/09 03:52:11
hopefully this functionality is already provided,
paulmeyer
2014/04/11 03:01:02
This functionality unfortunately isn't provided al
| |
270 }; | |
271 | |
272 class TabsSetZoomFunction : public ZoomAPIFunction { | |
273 private: | |
274 virtual ~TabsSetZoomFunction() {} | |
275 | |
276 virtual bool RunImpl() OVERRIDE; | |
277 | |
278 // Called when the zoom change has completed. | |
279 void Callback(); | |
280 | |
281 DECLARE_EXTENSION_FUNCTION("tabs.setZoom", TABS_SETZOOM) | |
282 }; | |
283 | |
284 class TabsGetZoomFunction : public ZoomAPIFunction { | |
285 private: | |
286 virtual ~TabsGetZoomFunction() {} | |
287 | |
288 virtual bool RunImpl() OVERRIDE; | |
289 | |
290 DECLARE_EXTENSION_FUNCTION("tabs.getZoom", TABS_GETZOOM) | |
291 }; | |
292 | |
293 class TabsSetZoomSettingsFunction : public ZoomAPIFunction { | |
294 private: | |
295 virtual ~TabsSetZoomSettingsFunction() {} | |
296 | |
297 virtual bool RunImpl() OVERRIDE; | |
298 | |
299 DECLARE_EXTENSION_FUNCTION("tabs.setZoomSettings", TABS_SETZOOMSETTINGS) | |
300 }; | |
301 | |
302 class TabsGetZoomSettingsFunction : public ZoomAPIFunction { | |
303 private: | |
304 virtual ~TabsGetZoomSettingsFunction() {} | |
305 | |
306 virtual bool RunImpl() OVERRIDE; | |
307 | |
308 DECLARE_EXTENSION_FUNCTION("tabs.getZoomSettings", TABS_GETZOOMSETTINGS) | |
309 }; | |
310 | |
259 } // namespace extensions | 311 } // namespace extensions |
260 | 312 |
261 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ | 313 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ |
OLD | NEW |