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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/zoom_decoration.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: fix mac Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_ZOOM_DECORATION_H_
6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_ZOOM_DECORATION_H_
7
8 #import <Cocoa/Cocoa.h>
9
10 #include "base/basictypes.h"
11 #include "chrome/browser/ui/cocoa/location_bar/image_decoration.h"
12
13 class ToolbarModel;
14 class ZoomController;
15
16 // Zoom icon at the end of the omnibox (close to page actions) when at a
17 // non-standard zoom level.
18 class ZoomDecoration : public ImageDecoration {
19 public:
20 explicit ZoomDecoration(ToolbarModel* toolbar_model);
21 virtual ~ZoomDecoration();
22
23 // Called when this decoration should show or hide itself in its most current
24 // state.
25 void Update(ZoomController* zoom_controller);
26
27 private:
28 // LocationBarDecoration implementation.
29 virtual NSString* GetToolTip() OVERRIDE;
30
31 // A reference to the toolbar model to query whether input is currently
32 // happening in the location bar. Not owned by this class.
33 ToolbarModel* toolbar_model_;
34
35 // The string to show for a tooltip.
36 scoped_nsobject<NSString> tooltip_;
37
38 DISALLOW_COPY_AND_ASSIGN(ZoomDecoration);
39 };
40
41 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_ZOOM_DECORATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698