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 |
index 0f1752c44aab0e2eafc93ffc72cbd34d79199496..13afb64cb64ebe802d978b1b5ff892717397843b 100644 |
--- a/chrome/browser/ui/views/location_bar/zoom_bubble_view.h |
+++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view.h |
@@ -9,6 +9,7 @@ |
#include "base/gtest_prod_util.h" |
#include "base/timer/timer.h" |
#include "chrome/browser/ui/views/frame/immersive_mode_controller.h" |
+#include "chrome/browser/ui/views/managed_full_screen_bubble_delegate_view.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
#include "extensions/browser/extension_icon_image.h" |
@@ -29,9 +30,8 @@ class ImageButton; |
} // namespace views |
// View used to display the zoom percentage when it has changed. |
-class ZoomBubbleView : public views::BubbleDelegateView, |
+class ZoomBubbleView : public ManagedFullScreenBubbleDelegateView, |
public views::ButtonListener, |
- public content::NotificationObserver, |
public ImmersiveModeController::Observer, |
public extensions::IconImage::Observer { |
public: |
@@ -79,18 +79,28 @@ class ZoomBubbleView : public views::BubbleDelegateView, |
FullscreenController* fullscreen_controller); |
~ZoomBubbleView() override; |
- // If the bubble is not anchored to a view, places the bubble in the top |
- // right (left in RTL) of the |screen_bounds| that contain |web_contents_|'s |
- // browser window. Because the positioning is based on the size of the |
- // bubble, this must be called after the bubble is created. |
- void AdjustForFullscreen(const gfx::Rect& screen_bounds); |
+ // ManagedFullScreenBubbleDelegateView: |
+ void OnGestureEvent(ui::GestureEvent* event) override; |
+ void OnMouseEntered(const ui::MouseEvent& event) override; |
+ void OnMouseExited(const ui::MouseEvent& event) override; |
+ void Init() override; |
+ void WindowClosing() override; |
+ void Close() override; |
+ |
+ // views::ButtonListener: |
+ void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
+ |
+ // ImmersiveModeController::Observer: |
+ void OnImmersiveRevealStarted() override; |
+ void OnImmersiveModeControllerDestroyed() override; |
+ |
+ // extensions::IconImage::Observer: |
+ void OnExtensionIconImageChanged(extensions::IconImage* /* image */) override; |
// Refreshes the bubble by changing the zoom percentage appropriately and |
// resetting the timer if necessary. |
void Refresh(); |
- void Close(); |
- |
// Sets information about the extension that initiated the zoom change. |
// Calling this method asserts that the extension |extension| did initiate |
// the zoom change. |
@@ -102,32 +112,6 @@ class ZoomBubbleView : public views::BubbleDelegateView, |
// Stops the auto-close timer. |
void StopTimer(); |
- // extensions::IconImage::Observer overrides: |
- void OnExtensionIconImageChanged(extensions::IconImage* /* image */) override; |
- |
- // views::View methods. |
- void OnMouseEntered(const ui::MouseEvent& event) override; |
- void OnMouseExited(const ui::MouseEvent& event) override; |
- |
- // ui::EventHandler method. |
- void OnGestureEvent(ui::GestureEvent* event) override; |
- |
- // views::ButtonListener method. |
- void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
- |
- // views::BubbleDelegateView method. |
- void Init() override; |
- void WindowClosing() override; |
- |
- // content::NotificationObserver method. |
- void Observe(int type, |
- const content::NotificationSource& source, |
- const content::NotificationDetails& details) override; |
- |
- // ImmersiveModeController::Observer methods. |
- void OnImmersiveRevealStarted() override; |
- void OnImmersiveModeControllerDestroyed() override; |
- |
ZoomBubbleExtensionInfo extension_info_; |
// Singleton instance of the zoom bubble. The zoom bubble can only be shown on |
@@ -157,9 +141,6 @@ class ZoomBubbleView : public views::BubbleDelegateView, |
// Not owned. |
ImmersiveModeController* immersive_mode_controller_; |
- // Used to register for fullscreen change notifications. |
- content::NotificationRegistrar registrar_; |
- |
DISALLOW_COPY_AND_ASSIGN(ZoomBubbleView); |
}; |