Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(951)

Unified Diff: chrome/browser/ui/zoom/zoom_controller.h

Issue 10736028: Refactor browser window zoom handling and enable zoom icon on all platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/location_bar/zoom_view.cc ('k') | chrome/browser/ui/zoom/zoom_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/zoom/zoom_controller.h
diff --git a/chrome/browser/ui/zoom/zoom_controller.h b/chrome/browser/ui/zoom/zoom_controller.h
index bb9fe5313dad158efdc403a4a5ce5b18582c4aef..f3d8415cf1e86246261fbce0ad5b2b67cc560e9e 100644
--- a/chrome/browser/ui/zoom/zoom_controller.h
+++ b/chrome/browser/ui/zoom/zoom_controller.h
@@ -19,18 +19,17 @@ class ZoomObserver;
class ZoomController : public content::NotificationObserver,
public content::WebContentsObserver {
public:
- enum ZoomIconState {
- NONE = 0,
- ZOOM_PLUS_ICON,
- ZOOM_MINUS_ICON,
- };
-
explicit ZoomController(TabContents* tab_contents);
virtual ~ZoomController();
- ZoomIconState zoom_icon_state() const { return zoom_icon_state_; }
int zoom_percent() const { return zoom_percent_; }
+ // Convenience method to quickly check if the tab's at default zoom.
+ bool IsAtDefaultZoom() const;
+
+ // Returns which image should be loaded for the current zoom level.
+ int GetResourceForZoomLevel() const;
+
void set_observer(ZoomObserver* observer) { observer_ = observer; }
private:
@@ -48,13 +47,10 @@ class ZoomController : public content::NotificationObserver,
// notifies the observer if changes have occurred. |can_show_bubble| will be
// true only if the active window changes the zoom on the current page (i.e.,
// inactive window zoom changes, creating a new tab/window, or shifting
- // between tabs/windows, although they may involve a change in the zoom, will
- // not trigger the bubble to be shown).
+ // between tabs/windows, although they may involve a change in the zoom,
+ // should not trigger showing a bubble).
void UpdateState(bool can_show_bubble);
- // The current zoom icon state.
- ZoomIconState zoom_icon_state_;
-
// The current zoom percentage.
int zoom_percent_;
« no previous file with comments | « chrome/browser/ui/views/location_bar/zoom_view.cc ('k') | chrome/browser/ui/zoom/zoom_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698