Index: chrome/browser/ui/views/location_bar/zoom_view.h |
diff --git a/chrome/browser/ui/views/location_bar/zoom_view.h b/chrome/browser/ui/views/location_bar/zoom_view.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d5ce668f0c694559593607e85ff58e27bfcd09cf |
--- /dev/null |
+++ b/chrome/browser/ui/views/location_bar/zoom_view.h |
@@ -0,0 +1,46 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_VIEW_H_ |
+#define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_VIEW_H_ |
+#pragma once |
+ |
+#include "base/basictypes.h" |
+#include "chrome/browser/ui/zoom/zoom_controller.h" |
+#include "ui/views/controls/image_view.h" |
+ |
+namespace views { |
+class KeyEvent; |
+class MouseEvent; |
+} |
+ |
+// View for the zoom icon in the Omnibox. |
+class ZoomView : public views::ImageView { |
+ public: |
+ ZoomView(); |
+ virtual ~ZoomView(); |
+ |
+ void SetZoomIconState(ZoomController::ZoomIconState zoom_icon_state); |
+ void SetZoomIconTooltipPercent(int zoom_percent); |
+ |
+ void Update(); |
Peter Kasting
2012/06/22 20:16:20
Nit: Add comments
Kyle Horimoto
2012/06/26 21:55:53
Done.
|
+ private: |
Peter Kasting
2012/06/22 20:16:20
Nit: Add blank line above
Kyle Horimoto
2012/06/26 21:55:53
Done.
|
+ // views::ImageView overrides: |
+ virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
+ virtual bool GetTooltipText(const gfx::Point& p, |
+ string16* tooltip) const OVERRIDE; |
+ virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
+ virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
+ virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE; |
+ |
+ // The current icon state. |
+ ZoomController::ZoomIconState zoom_icon_state_; |
+ |
+ // The current zoom percentage. |
+ int zoom_percent_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ZoomView); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_VIEW_H_ |