OLD | NEW |
(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_ |
OLD | NEW |