| Index: extensions/browser/ui/zoom/zoom_controller.h
|
| diff --git a/chrome/browser/ui/zoom/zoom_controller.h b/extensions/browser/ui/zoom/zoom_controller.h
|
| similarity index 93%
|
| rename from chrome/browser/ui/zoom/zoom_controller.h
|
| rename to extensions/browser/ui/zoom/zoom_controller.h
|
| index 7dad4ad35ec9f9b6e3336d02920f231fdbc01442..e57e62e3dc3648d1fea48bac96dc532236ffef4c 100644
|
| --- a/chrome/browser/ui/zoom/zoom_controller.h
|
| +++ b/extensions/browser/ui/zoom/zoom_controller.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_
|
| -#define CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_
|
| +#ifndef EXTENSIONS_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_
|
| +#define EXTENSIONS_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_
|
|
|
| #include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| @@ -14,7 +14,7 @@
|
| #include "content/public/browser/web_contents_observer.h"
|
| #include "content/public/browser/web_contents_user_data.h"
|
|
|
| -class ZoomObserver;
|
| +class ZoomControllerTest;
|
|
|
| namespace content {
|
| class WebContents;
|
| @@ -22,7 +22,7 @@ class WebContents;
|
|
|
| namespace extensions {
|
| class Extension;
|
| -} // namespace extensions
|
| +class ZoomObserver;
|
|
|
| // Per-tab class to manage zoom changes and the Omnibox zoom icon.
|
| class ZoomController : public content::WebContentsObserver,
|
| @@ -48,6 +48,12 @@ class ZoomController : public content::WebContentsObserver,
|
| ZOOM_MODE_DISABLED,
|
| };
|
|
|
| + enum RelativeZoom {
|
| + ZOOM_BELOW_DEFAULT_ZOOM,
|
| + ZOOM_AT_DEFAULT_ZOOM,
|
| + ZOOM_ABOVE_DEFAULT_ZOOM
|
| + };
|
| +
|
| struct ZoomChangedEventData {
|
| ZoomChangedEventData(content::WebContents* web_contents,
|
| double old_zoom_level,
|
| @@ -81,7 +87,7 @@ class ZoomController : public content::WebContentsObserver,
|
| bool IsAtDefaultZoom() const;
|
|
|
| // Returns which image should be loaded for the current zoom level.
|
| - int GetResourceForZoomLevel() const;
|
| + RelativeZoom GetZoomRelativeToDefault() const;
|
|
|
| const extensions::Extension* last_extension() const {
|
| return last_extension_.get();
|
| @@ -130,7 +136,7 @@ class ZoomController : public content::WebContentsObserver,
|
|
|
| private:
|
| friend class content::WebContentsUserData<ZoomController>;
|
| - friend class ZoomControllerTest;
|
| + friend class ::ZoomControllerTest;
|
|
|
| void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change);
|
|
|
| @@ -165,4 +171,6 @@ class ZoomController : public content::WebContentsObserver,
|
| DISALLOW_COPY_AND_ASSIGN(ZoomController);
|
| };
|
|
|
| -#endif // CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_
|
| +} // namespace extensions
|
| +
|
| +#endif // EXTENSIONS_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_
|
|
|