Index: chrome/browser/ui/views/location_bar/zoom_bubble_view.h |
diff --git a/chrome/browser/ui/views/location_bar/zoom_bubble_view.h b/chrome/browser/ui/views/location_bar/zoom_bubble_view.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7dead0bc6c447e1512c534b56a31ac566821aaa9 |
--- /dev/null |
+++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view.h |
@@ -0,0 +1,47 @@ |
+// 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_BUBBLE_VIEW_H_ |
+#define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_BUBBLE_VIEW_H_ |
+#pragma once |
+ |
+#include "base/memory/weak_ptr.h" |
+#include "ui/views/bubble/bubble_delegate.h" |
+#include "ui/views/controls/button/button.h" |
+#include "ui/views/controls/label.h" |
+ |
+// View used to display the zoom percentage when it has changed. |
+class ZoomBubbleView : public views::BubbleDelegateView { |
+ public: |
+ static void ShowBubble(views::View* anchor_view, |
+ int zoom_percent, |
+ bool autoclose); |
+ static void CloseBubble(); |
+ static bool IsShowing(); |
+ |
+ // views::WidgetDelegate method. |
+ virtual void WindowClosing() OVERRIDE; |
+ |
+ protected: |
+ // views::BubbleDelegateView method. |
+ virtual void Init() OVERRIDE; |
+ |
+ private: |
+ ZoomBubbleView(views::View* anchor_view, |
+ int zoom_percent, |
+ bool autoclose); |
+ virtual ~ZoomBubbleView(); |
+ |
+ void Close(); |
+ |
+ static ZoomBubbleView* zoom_bubble_; |
+ |
+ base::WeakPtrFactory<ZoomBubbleView> factory_; |
+ |
+ int zoom_percent_; |
+ bool autoclose_; |
+ views::Label* zoom_percent_label_; |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_BUBBLE_VIEW_H_ |