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 #pragma once |
| 8 |
| 9 #import <Cocoa/Cocoa.h> |
| 10 |
| 11 #include "base/basictypes.h" |
| 12 #include "chrome/browser/ui/cocoa/location_bar/image_decoration.h" |
| 13 #include "chrome/browser/ui/zoom/zoom_controller.h" |
| 14 |
| 15 class ToolbarModel; |
| 16 |
| 17 // Zoom icon at the end of the omnibox (close to page actions) when at a |
| 18 // non-standard zoom level. |
| 19 class ZoomDecoration : public ImageDecoration { |
| 20 public: |
| 21 explicit ZoomDecoration(ToolbarModel* toolbar_model); |
| 22 virtual ~ZoomDecoration(); |
| 23 |
| 24 // Called when this decoration should show or hide itself in its most current |
| 25 // state. |
| 26 void Update(ZoomController* zoom_controller); |
| 27 |
| 28 private: |
| 29 // LocationBarDecoration implementation. |
| 30 virtual NSString* GetToolTip() OVERRIDE; |
| 31 |
| 32 // A reference to the toolbar model to query whether input is currently |
| 33 // happening in the location bar. Not owned by this class. |
| 34 ToolbarModel* toolbar_model_; |
| 35 |
| 36 // The string to show for a tooltip. |
| 37 scoped_nsobject<NSString> tooltip_; |
| 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(ZoomDecoration); |
| 40 }; |
| 41 |
| 42 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_ZOOM_DECORATION_H_ |
OLD | NEW |