Chromium Code Reviews| Index: chrome/browser/extensions/api/tabs/tabs_api.h |
| diff --git a/chrome/browser/extensions/api/tabs/tabs_api.h b/chrome/browser/extensions/api/tabs/tabs_api.h |
| index 481046977f7ca7d439fa670f0141d263be41cf11..efa8b1b1fd5f230791a4bafb37589710c925cf7f 100644 |
| --- a/chrome/browser/extensions/api/tabs/tabs_api.h |
| +++ b/chrome/browser/extensions/api/tabs/tabs_api.h |
| @@ -42,6 +42,10 @@ class PrefRegistrySyncable; |
| namespace extensions { |
| +// Converts a ZoomMode to its zoom settings dictionary object representation. |
| +void ZoomModeToZoomSettings(content::ZoomMode zoom_mode, |
| + 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
|
| + |
| // Windows |
| class WindowsGetFunction : public ChromeSyncExtensionFunction { |
| virtual ~WindowsGetFunction() {} |
| @@ -256,6 +260,54 @@ class TabsInsertCSSFunction : public ExecuteCodeInTabFunction { |
| DECLARE_EXTENSION_FUNCTION("tabs.insertCSS", TABS_INSERTCSS) |
| }; |
| +class ZoomAPIFunction : public ChromeAsyncExtensionFunction { |
| + protected: |
| + virtual ~ZoomAPIFunction() {} |
| + |
| + // Gets the WebContents for |tab_id| if it is specified. Otherwise get the |
| + // WebContents for the active tab in the current window. |
| + 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
|
| +}; |
| + |
| +class TabsSetZoomFunction : public ZoomAPIFunction { |
| + private: |
| + virtual ~TabsSetZoomFunction() {} |
| + |
| + virtual bool RunImpl() OVERRIDE; |
| + |
| + // Called when the zoom change has completed. |
| + void Callback(); |
| + |
| + DECLARE_EXTENSION_FUNCTION("tabs.setZoom", TABS_SETZOOM) |
| +}; |
| + |
| +class TabsGetZoomFunction : public ZoomAPIFunction { |
| + private: |
| + virtual ~TabsGetZoomFunction() {} |
| + |
| + virtual bool RunImpl() OVERRIDE; |
| + |
| + DECLARE_EXTENSION_FUNCTION("tabs.getZoom", TABS_GETZOOM) |
| +}; |
| + |
| +class TabsSetZoomSettingsFunction : public ZoomAPIFunction { |
| + private: |
| + virtual ~TabsSetZoomSettingsFunction() {} |
| + |
| + virtual bool RunImpl() OVERRIDE; |
| + |
| + DECLARE_EXTENSION_FUNCTION("tabs.setZoomSettings", TABS_SETZOOMSETTINGS) |
| +}; |
| + |
| +class TabsGetZoomSettingsFunction : public ZoomAPIFunction { |
| + private: |
| + virtual ~TabsGetZoomSettingsFunction() {} |
| + |
| + virtual bool RunImpl() OVERRIDE; |
| + |
| + DECLARE_EXTENSION_FUNCTION("tabs.getZoomSettings", TABS_GETZOOMSETTINGS) |
| +}; |
| + |
| } // namespace extensions |
| #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ |