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 1bf4c8d6a5f0ae15f017c76090b82bdbb9672b43..f19d752d0f5a744f92185df6d6fbf50e443c1ba0 100644 |
--- a/chrome/browser/ui/views/location_bar/zoom_bubble_view.h |
+++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view.h |
@@ -7,13 +7,14 @@ |
#include "base/basictypes.h" |
#include "base/timer.h" |
+#include "chrome/browser/ui/views/frame/immersive_mode_controller.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
#include "ui/views/bubble/bubble_delegate.h" |
#include "ui/views/controls/button/button.h" |
#include "ui/views/controls/label.h" |
-class FullscreenController; |
+class BrowserView; |
namespace content { |
class NotificationDetails; |
@@ -24,7 +25,8 @@ class WebContents; |
// View used to display the zoom percentage when it has changed. |
class ZoomBubbleView : public views::BubbleDelegateView, |
public views::ButtonListener, |
- public content::NotificationObserver { |
+ public content::NotificationObserver, |
+ public ImmersiveModeController::Observer { |
public: |
// Shows the bubble and automatically closes it after a short time period if |
// |auto_close| is true. |
@@ -41,12 +43,13 @@ class ZoomBubbleView : public views::BubbleDelegateView, |
ZoomBubbleView(views::View* anchor_view, |
content::WebContents* web_contents, |
bool auto_close, |
- FullscreenController* fullscreen_controller); |
+ BrowserView* browser_view); |
virtual ~ZoomBubbleView(); |
- // Place 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. |
+ // 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_content_|'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); |
// Refreshes the bubble by changing the zoom percentage appropriately and |
@@ -81,6 +84,9 @@ class ZoomBubbleView : public views::BubbleDelegateView, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) OVERRIDE; |
+ // ImmersiveModeController::Observer method. |
+ virtual void OnStartedImmersiveReveal() OVERRIDE; |
+ |
// Singleton instance of the zoom bubble. The zoom bubble can only be shown on |
// the active browser window, so there is no case in which it will be shown |
// twice at the same time. |
@@ -98,6 +104,10 @@ class ZoomBubbleView : public views::BubbleDelegateView, |
// Whether the currently displayed bubble will automatically close. |
bool auto_close_; |
+ // Keeps the top-of-window views revealed (but does not initiate a reveal) |
+ // when the bubble is visible in immersive fullscreen. |
+ scoped_ptr<ImmersiveRevealedLock> immersive_reveal_lock_; |
+ |
// Used to register for fullscreen change notifications. |
content::NotificationRegistrar registrar_; |