summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 21:07:40 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 21:07:40 +0000
commitc858acfa9880253cdd052fa7df8c7af859eee5e8 (patch)
treec8c4d3931a9675da2f4dcc7127826180bee3399a
parent2862df46fb1f2429b9a5e0d6f2b8e62d7f266950 (diff)
downloadchromium_src-c858acfa9880253cdd052fa7df8c7af859eee5e8.zip
chromium_src-c858acfa9880253cdd052fa7df8c7af859eee5e8.tar.gz
chromium_src-c858acfa9880253cdd052fa7df8c7af859eee5e8.tar.bz2
Animate the fullscreen exit bubble's opacity instead of its bounds when in immersive fullscreen.
BUG=188567 Test=Manual, see instructions below. 1) Run Chrome with --ash-immersive-fullscreen 2) Go to http://html5-demos.appspot.com/static/fullscreen.html 3) Use F11 to toggle immersive fullscreen 4) With the top-of-window views closed, click on the "Toggle Fullscreen" button on the web page. 5) Hover at the top of the screen till the top-of-window views reveal. (Do this before the exit bubble fades out) Check that the exit fullscreen bubble animates with the top-of-window views. 6) Once the exit bubble disappears, check that it cannot be brought back by hovering at the top of the screen. 7) Exit tab fullscreen and browser fullscreen. 8) Enter tab fullscreen again by pressing the "Toggle fullscreen" button on the web page 9) Check that the exit fullscreen bubble slides in and out. (Note that when the exit bubble is initially shown it does not animate at all) 10) Go to chrome://settings > Show advanced settings... > Content settings... > Mouse cursor > Manage exceptions... 11) Remove an exception for www.html5rocks.com if there is one 12) Go to www.html5rocks.com/en/tutorials/pointerlock/intro 13) Use F11 to toggle immersive fullscreen 14) With the top-of-window views closed, click on the "Click me!" yellow box on the web page. (in the Interactive Example) section. 15) Hover at the top of the screen till the top-of-window views reveal. Check that the mouse lock bubble animates with the top-of-window views. 16) Click on the "Allow" button in the bubble. 17) Check that the mouse lock bubble fades out (as opposed to sliding out). 18) Press Escape and F11 to exit mouse lock and fullscreen 19) Click on the "Click me!" yellow box again. Check that the bubble slides out. Review URL: https://chromiumcodereview.appspot.com/13866033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195281 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/fullscreen/fullscreen_exit_bubble.cc14
-rw-r--r--chrome/browser/ui/fullscreen/fullscreen_exit_bubble.h11
-rw-r--r--chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.cc4
-rw-r--r--chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h1
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc4
-rw-r--r--chrome/browser/ui/views/frame/browser_view.h2
-rw-r--r--chrome/browser/ui/views/fullscreen_exit_bubble_views.cc195
-rw-r--r--chrome/browser/ui/views/fullscreen_exit_bubble_views.h54
8 files changed, 231 insertions, 54 deletions
diff --git a/chrome/browser/ui/fullscreen/fullscreen_exit_bubble.cc b/chrome/browser/ui/fullscreen/fullscreen_exit_bubble.cc
index ad8e3d3..e40ffb5 100644
--- a/chrome/browser/ui/fullscreen/fullscreen_exit_bubble.cc
+++ b/chrome/browser/ui/fullscreen/fullscreen_exit_bubble.cc
@@ -60,6 +60,10 @@ void FullscreenExitBubble::StopWatchingMouse() {
mouse_position_checker_.Stop();
}
+bool FullscreenExitBubble::IsWatchingMouse() const {
+ return mouse_position_checker_.IsRunning();
+}
+
void FullscreenExitBubble::CheckMousePosition() {
// Desired behavior:
//
@@ -101,10 +105,12 @@ void FullscreenExitBubble::CheckMousePosition() {
if (!initial_delay_.IsRunning()) {
Hide();
}
- } else if ((cursor_pos.y() < kSlideInRegionHeightPx) ||
- IsAnimating()) {
- // The cursor is not idle, and either it's in the slide-in region or it's in
- // the neutral region and we're sliding out.
+ } else if (cursor_pos.y() < kSlideInRegionHeightPx &&
+ CanMouseTriggerSlideIn()) {
+ Show();
+ } else if (IsAnimating()) {
+ // The cursor is not idle and either it's in the slide-in region or it's in
+ // the neutral region and we're sliding in or out.
Show();
}
}
diff --git a/chrome/browser/ui/fullscreen/fullscreen_exit_bubble.h b/chrome/browser/ui/fullscreen/fullscreen_exit_bubble.h
index 6bb8082..da20148 100644
--- a/chrome/browser/ui/fullscreen/fullscreen_exit_bubble.h
+++ b/chrome/browser/ui/fullscreen/fullscreen_exit_bubble.h
@@ -56,12 +56,17 @@ class FullscreenExitBubble : public ui::AnimationDelegate {
virtual bool IsAnimating() = 0;
- // Called repeatedly to get the current mouse position and animate the bubble
- // on or off the screen as appropriate.
- void CheckMousePosition();
+ // True if the mouse position can trigger sliding in the exit fullscreen
+ // bubble when the bubble is hidden.
+ virtual bool CanMouseTriggerSlideIn() const = 0;
void StartWatchingMouse();
void StopWatchingMouse();
+ bool IsWatchingMouse() const;
+
+ // Called repeatedly to get the current mouse position and animate the bubble
+ // on or off the screen as appropriate.
+ void CheckMousePosition();
void ToggleFullscreen();
// Accepts the request. Can cause FullscreenExitBubble to be deleted.
diff --git a/chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.cc b/chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.cc
index 612c036..120750e 100644
--- a/chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.cc
@@ -225,6 +225,10 @@ bool FullscreenExitBubbleGtk::IsAnimating() {
return slide_widget_->IsAnimating();
}
+bool FullscreenExitBubbleGtk::CanMouseTriggerSlideIn() const {
+ return true;
+}
+
void FullscreenExitBubbleGtk::StartWatchingMouseIfNecessary() {
if (!fullscreen_bubble::ShowButtonsForType(bubble_type_))
StartWatchingMouse();
diff --git a/chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h b/chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h
index fdb191e..a277b94 100644
--- a/chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h
+++ b/chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h
@@ -42,6 +42,7 @@ class FullscreenExitBubbleGtk : public FullscreenExitBubble,
virtual void Hide() OVERRIDE;
virtual void Show() OVERRIDE;
virtual bool IsAnimating() OVERRIDE;
+ virtual bool CanMouseTriggerSlideIn() const OVERRIDE;
private:
void InitWidgets();
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 9ca2ba6..8be9b06 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -809,7 +809,7 @@ void BrowserView::UpdateFullscreenExitBubbleContent(
fullscreen_bubble_->UpdateContent(url, bubble_type);
} else {
fullscreen_bubble_.reset(new FullscreenExitBubbleViews(
- GetWidget(), browser_.get(), url, bubble_type));
+ this, url, bubble_type));
}
}
@@ -2319,7 +2319,7 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
type != FOR_METRO &&
!UseImmersiveFullscreenForUrl(url)) {
fullscreen_bubble_.reset(new FullscreenExitBubbleViews(
- GetWidget(), browser_.get(), url, bubble_type));
+ this, url, bubble_type));
}
} else {
#if defined(OS_WIN) && !defined(USE_AURA)
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
index 1586467..cae4cf5 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -218,7 +218,7 @@ class BrowserView : public BrowserWindow,
void FullScreenStateChanged();
// See ImmersiveModeController for description.
- ImmersiveModeController* immersive_mode_controller() {
+ ImmersiveModeController* immersive_mode_controller() const {
return immersive_mode_controller_.get();
}
diff --git a/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc b/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc
index e9599b1..d9a84eb 100644
--- a/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc
+++ b/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc
@@ -7,6 +7,12 @@
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
+#include "chrome/browser/ui/fullscreen/fullscreen_controller.h"
+#include "chrome/browser/ui/views/frame/browser_view.h"
+#include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
+#include "chrome/browser/ui/views/frame/top_container_view.h"
+#include "chrome/common/chrome_notification_types.h"
+#include "content/public/browser/notification_service.h"
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
#include "grit/ui_strings.h"
@@ -249,19 +255,20 @@ void FullscreenExitBubbleViews::FullscreenExitView::UpdateContent(
// FullscreenExitBubbleViews ---------------------------------------------------
FullscreenExitBubbleViews::FullscreenExitBubbleViews(
- views::Widget* frame,
- Browser* browser,
+ BrowserView* browser_view,
const GURL& url,
FullscreenExitBubbleType bubble_type)
- : FullscreenExitBubble(browser, url, bubble_type),
- root_view_(frame->GetRootView()),
+ : FullscreenExitBubble(browser_view->browser(), url, bubble_type),
+ browser_view_(browser_view),
popup_(NULL),
- size_animation_(new ui::SlideAnimation(this)) {
- size_animation_->Reset(1);
+ animation_(new ui::SlideAnimation(this)),
+ animated_attribute_(ANIMATED_ATTRIBUTE_BOUNDS) {
+ animation_->Reset(1);
// Create the contents view.
ui::Accelerator accelerator(ui::VKEY_UNKNOWN, ui::EF_NONE);
- bool got_accelerator = frame->GetAccelerator(IDC_FULLSCREEN, &accelerator);
+ bool got_accelerator = browser_view_->GetWidget()->GetAccelerator(
+ IDC_FULLSCREEN, &accelerator);
DCHECK(got_accelerator);
view_ = new FullscreenExitView(
this, accelerator.GetShortcutText(), url, bubble_type_);
@@ -273,7 +280,7 @@ FullscreenExitBubbleViews::FullscreenExitBubbleViews(
params.transparent = true;
params.can_activate = false;
params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
- params.parent = frame->GetNativeView();
+ params.parent = browser_view_->GetWidget()->GetNativeView();
params.bounds = GetPopupRect(false);
popup_->Init(params);
gfx::Size size = GetPopupRect(true).size();
@@ -286,10 +293,25 @@ FullscreenExitBubbleViews::FullscreenExitBubbleViews(
view_->SetBounds(0, 0, size.width(), size.height());
popup_->Show(); // This does not activate the popup.
- StartWatchingMouseIfNecessary();
+ popup_->AddObserver(this);
+
+ registrar_.Add(
+ this,
+ chrome::NOTIFICATION_FULLSCREEN_CHANGED,
+ content::Source<FullscreenController>(
+ browser_view_->browser()->fullscreen_controller()));
+
+ UpdateForImmersiveState();
}
FullscreenExitBubbleViews::~FullscreenExitBubbleViews() {
+ popup_->RemoveObserver(this);
+ ImmersiveModeController* immersive_controller =
+ browser_view_->immersive_mode_controller();
+ // |immersive_controller| may already have been destroyed.
+ if (immersive_controller)
+ immersive_controller->UnanchorWidgetFromTopContainer(popup_);
+
// This is tricky. We may be in an ATL message handler stack, in which case
// the popup cannot be deleted yet. We also can't set the popup's ownership
// model to NATIVE_WIDGET_OWNS_WIDGET because if the user closed the last tab
@@ -319,12 +341,68 @@ void FullscreenExitBubbleViews::UpdateContent(
popup_->SetBounds(GetPopupRect(false));
Show();
+ // Stop watching the mouse even if UpdateMouseWatcher() will start watching
+ // it again so that the popup with the new content is visible for at least
+ // |kInitialDelayMs|.
StopWatchingMouse();
- StartWatchingMouseIfNecessary();
+
+ UpdateMouseWatcher();
}
-void FullscreenExitBubbleViews::AnimationProgressed(
- const ui::Animation* animation) {
+void FullscreenExitBubbleViews::UpdateMouseWatcher() {
+ bool should_watch_mouse = false;
+ if (popup_->IsVisible())
+ should_watch_mouse = !fullscreen_bubble::ShowButtonsForType(bubble_type_);
+ else
+ should_watch_mouse = CanMouseTriggerSlideIn();
+
+ if (should_watch_mouse == IsWatchingMouse())
+ return;
+
+ if (should_watch_mouse)
+ StartWatchingMouse();
+ else
+ StopWatchingMouse();
+}
+
+void FullscreenExitBubbleViews::UpdateForImmersiveState() {
+ ImmersiveModeController* immersive_controller =
+ browser_view_->immersive_mode_controller();
+
+ AnimatedAttribute expected_animated_attribute =
+ immersive_controller->IsEnabled() ?
+ ANIMATED_ATTRIBUTE_OPACITY : ANIMATED_ATTRIBUTE_BOUNDS;
+ if (animated_attribute_ != expected_animated_attribute) {
+ // If an animation is currently in progress, skip to the end because
+ // switching the animated attribute midway through the animation looks
+ // weird.
+ animation_->End();
+
+ animated_attribute_ = expected_animated_attribute;
+
+ // We may have finished hiding |popup_|. However, the bounds animation
+ // assumes |popup_| has the opacity when it is fully shown and the opacity
+ // animation assumes |popup_| has the bounds when |popup_| is fully shown.
+ if (animated_attribute_ == ANIMATED_ATTRIBUTE_BOUNDS)
+ popup_->SetOpacity(255);
+ else
+ UpdateBounds();
+ }
+
+ if (immersive_controller->IsEnabled()) {
+ // In immersive mode, anchor |popup_| to the top container. This repositions
+ // the top container so that it stays |kPopupTopPx| below the top container
+ // when the top container animates its position (top container reveals /
+ // unreveals) or the top container bounds change (eg bookmark bar is shown).
+ immersive_controller->AnchorWidgetToTopContainer(popup_, kPopupTopPx);
+ } else {
+ immersive_controller->UnanchorWidgetFromTopContainer(popup_);
+ }
+
+ UpdateMouseWatcher();
+}
+
+void FullscreenExitBubbleViews::UpdateBounds() {
gfx::Rect popup_rect(GetPopupRect(false));
if (popup_rect.IsEmpty()) {
popup_->Hide();
@@ -335,6 +413,25 @@ void FullscreenExitBubbleViews::AnimationProgressed(
}
}
+views::View* FullscreenExitBubbleViews::GetBrowserRootView() const {
+ return browser_view_->GetWidget()->GetRootView();
+}
+
+void FullscreenExitBubbleViews::AnimationProgressed(
+ const ui::Animation* animation) {
+ if (animated_attribute_ == ANIMATED_ATTRIBUTE_OPACITY) {
+ int opacity = animation_->CurrentValueBetween(0, 255);
+ if (opacity == 0) {
+ popup_->Hide();
+ } else {
+ popup_->Show();
+ popup_->SetOpacity(opacity);
+ }
+ } else {
+ UpdateBounds();
+ }
+}
+
void FullscreenExitBubbleViews::AnimationEnded(
const ui::Animation* animation) {
AnimationProgressed(animation);
@@ -343,56 +440,84 @@ void FullscreenExitBubbleViews::AnimationEnded(
gfx::Rect FullscreenExitBubbleViews::GetPopupRect(
bool ignore_animation_state) const {
gfx::Size size(view_->GetPreferredSize());
- // NOTE: don't use the bounds of the root_view_. On linux changing window
+ // NOTE: don't use the bounds of the root_view_. On linux GTK changing window
// size is async. Instead we use the size of the screen.
gfx::Screen* screen =
- gfx::Screen::GetScreenFor(root_view_->GetWidget()->GetNativeView());
+ gfx::Screen::GetScreenFor(browser_view_->GetWidget()->GetNativeView());
gfx::Rect screen_bounds = screen->GetDisplayNearestWindow(
- root_view_->GetWidget()->GetNativeView()).bounds();
- gfx::Point origin(screen_bounds.x() +
- (screen_bounds.width() - size.width()) / 2,
- kPopupTopPx + screen_bounds.y());
- if (!ignore_animation_state) {
+ browser_view_->GetWidget()->GetNativeView()).bounds();
+ int x = screen_bounds.x() + (screen_bounds.width() - size.width()) / 2;
+
+ int top_container_bottom = screen_bounds.y();
+ if (browser_view_->immersive_mode_controller()->IsEnabled()) {
+ // Skip querying the top container height in non-immersive fullscreen
+ // because:
+ // - The top container height is always zero in non-immersive fullscreen.
+ // - Querying the top container height may return the height before entering
+ // fullscreen because layout is disabled while entering fullscreen.
+ // A visual glitch due to the delayed layout is avoided in immersive
+ // fullscreen because entering fullscreen starts with the top container
+ // revealed. When revealed, the top container has the same height as before
+ // entering fullscreen.
+ top_container_bottom =
+ browser_view_->top_container()->GetTargetBoundsInScreen().bottom();
+ }
+ int y = top_container_bottom + kPopupTopPx;
+
+ if (!ignore_animation_state &&
+ animated_attribute_ == ANIMATED_ATTRIBUTE_BOUNDS) {
int total_height = size.height() + kPopupTopPx;
- int popup_bottom = size_animation_->CurrentValueBetween(
- static_cast<double>(total_height), 0.0f);
+ int popup_bottom = animation_->CurrentValueBetween(total_height, 0);
int y_offset = std::min(popup_bottom, kPopupTopPx);
size.set_height(size.height() - popup_bottom + y_offset);
- origin.set_y(origin.y() - y_offset);
+ y -= y_offset;
}
- return gfx::Rect(origin, size);
+ return gfx::Rect(gfx::Point(x, y), size);
}
gfx::Point FullscreenExitBubbleViews::GetCursorScreenPoint() {
gfx::Point cursor_pos = gfx::Screen::GetScreenFor(
- root_view_->GetWidget()->GetNativeView())->GetCursorScreenPoint();
- views::View::ConvertPointToTarget(NULL, root_view_, &cursor_pos);
+ browser_view_->GetWidget()->GetNativeView())->GetCursorScreenPoint();
+ views::View::ConvertPointToTarget(NULL, GetBrowserRootView(), &cursor_pos);
return cursor_pos;
}
bool FullscreenExitBubbleViews::WindowContainsPoint(gfx::Point pos) {
- return root_view_->HitTestPoint(pos);
+ return GetBrowserRootView()->HitTestPoint(pos);
}
bool FullscreenExitBubbleViews::IsWindowActive() {
- return root_view_->GetWidget()->IsActive();
+ return browser_view_->GetWidget()->IsActive();
}
void FullscreenExitBubbleViews::Hide() {
- size_animation_->SetSlideDuration(kSlideOutDurationMs);
- size_animation_->Hide();
+ animation_->SetSlideDuration(kSlideOutDurationMs);
+ animation_->Hide();
}
void FullscreenExitBubbleViews::Show() {
- size_animation_->SetSlideDuration(kSlideInDurationMs);
- size_animation_->Show();
+ animation_->SetSlideDuration(kSlideInDurationMs);
+ animation_->Show();
}
bool FullscreenExitBubbleViews::IsAnimating() {
- return size_animation_->GetCurrentValue() != 0;
+ return animation_->is_animating();
}
-void FullscreenExitBubbleViews::StartWatchingMouseIfNecessary() {
- if (!fullscreen_bubble::ShowButtonsForType(bubble_type_))
- StartWatchingMouse();
+bool FullscreenExitBubbleViews::CanMouseTriggerSlideIn() const {
+ return !browser_view_->immersive_mode_controller()->IsEnabled();
+}
+
+void FullscreenExitBubbleViews::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
+ DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type);
+ UpdateForImmersiveState();
+}
+
+void FullscreenExitBubbleViews::OnWidgetVisibilityChanged(
+ views::Widget* widget,
+ bool visible) {
+ UpdateMouseWatcher();
}
diff --git a/chrome/browser/ui/views/fullscreen_exit_bubble_views.h b/chrome/browser/ui/views/fullscreen_exit_bubble_views.h
index e1a8f63..0d7e2d7 100644
--- a/chrome/browser/ui/views/fullscreen_exit_bubble_views.h
+++ b/chrome/browser/ui/views/fullscreen_exit_bubble_views.h
@@ -8,7 +8,11 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/fullscreen/fullscreen_exit_bubble.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+#include "ui/views/widget/widget_observer.h"
+class BrowserView;
class GURL;
namespace ui {
class SlideAnimation;
@@ -22,10 +26,11 @@ class Widget;
// screen in fullscreen mode, telling users how to exit and providing a click
// target. The bubble auto-hides, and re-shows when the user moves to the
// screen top.
-class FullscreenExitBubbleViews : public FullscreenExitBubble {
+class FullscreenExitBubbleViews : public FullscreenExitBubble,
+ public content::NotificationObserver,
+ public views::WidgetObserver {
public:
- FullscreenExitBubbleViews(views::Widget* frame,
- Browser* browser,
+ FullscreenExitBubbleViews(BrowserView* browser,
const GURL& url,
FullscreenExitBubbleType bubble_type);
virtual ~FullscreenExitBubbleViews();
@@ -35,7 +40,26 @@ class FullscreenExitBubbleViews : public FullscreenExitBubble {
private:
class FullscreenExitView;
- // FullScreenExitBubble
+ enum AnimatedAttribute {
+ ANIMATED_ATTRIBUTE_BOUNDS,
+ ANIMATED_ATTRIBUTE_OPACITY
+ };
+
+ // Starts or stops polling the mouse location based on |popup_| and
+ // |bubble_type_|.
+ void UpdateMouseWatcher();
+
+ // Updates any state which depends on whether the user is in immersive
+ // fullscreen.
+ void UpdateForImmersiveState();
+
+ // Updates |popup|'s bounds given |animation_| and |animated_attribute_|.
+ void UpdateBounds();
+
+ // Returns the root view containing |browser_view_|.
+ views::View* GetBrowserRootView() const;
+
+ // FullScreenExitBubble overrides:
virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
virtual gfx::Rect GetPopupRect(bool ignore_animation_state) const OVERRIDE;
@@ -45,20 +69,32 @@ class FullscreenExitBubbleViews : public FullscreenExitBubble {
virtual void Hide() OVERRIDE;
virtual void Show() OVERRIDE;
virtual bool IsAnimating() OVERRIDE;
+ virtual bool CanMouseTriggerSlideIn() const OVERRIDE;
+
+ // content::NotificationObserver override:
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
- void StartWatchingMouseIfNecessary();
+ // views::WidgetObserver override:
+ virtual void OnWidgetVisibilityChanged(views::Widget* widget,
+ bool visible) OVERRIDE;
- // The root view containing us.
- views::View* root_view_;
+ BrowserView* browser_view_;
views::Widget* popup_;
- // Animation controlling sliding into/out of the top of the screen.
- scoped_ptr<ui::SlideAnimation> size_animation_;
+ // Animation controlling showing/hiding of the exit bubble.
+ scoped_ptr<ui::SlideAnimation> animation_;
+
+ // Attribute animated by |animation_|.
+ AnimatedAttribute animated_attribute_;
// The contents of the popup.
FullscreenExitView* view_;
+ content::NotificationRegistrar registrar_;
+
DISALLOW_COPY_AND_ASSIGN(FullscreenExitBubbleViews);
};