| 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..a9c5c9c35ec8d096ed5943819cd5665d5cc859d0 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);
|
| +
|
| // Windows
|
| class WindowsGetFunction : public ChromeSyncExtensionFunction {
|
| virtual ~WindowsGetFunction() {}
|
| @@ -256,6 +260,65 @@ 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);
|
| +};
|
| +
|
| +class TabsSetZoomFunction : public ZoomAPIFunction,
|
| + public content::NotificationObserver {
|
| + public:
|
| + TabsSetZoomFunction();
|
| +
|
| + private:
|
| + virtual ~TabsSetZoomFunction() {}
|
| +
|
| + virtual bool RunImpl() OVERRIDE;
|
| +
|
| + // content::NotificationObserver.
|
| + virtual void Observe(int type,
|
| + const content::NotificationSource& source,
|
| + const content::NotificationDetails& details) OVERRIDE;
|
| +
|
| + // The unique identifier of this initiated zoom change.
|
| + int zoom_id_;
|
| +
|
| + content::NotificationRegistrar registrar_;
|
| +
|
| + 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_
|
|
|