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

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

Issue 10831372: Revert 152080 - 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
===================================================================
--- chrome/browser/ui/zoom/zoom_controller.h (revision 152086)
+++ chrome/browser/ui/zoom/zoom_controller.h (working copy)
@@ -19,17 +19,18 @@
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:
@@ -47,10 +48,13 @@
// 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,
- // should not trigger showing a bubble).
+ // between tabs/windows, although they may involve a change in the zoom, will
+ // not trigger the bubble to be shown).
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