diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-22 03:36:13 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-22 03:36:13 +0000 |
commit | b1c37fc29acdd561962de77b868dafe1f9a804ee (patch) | |
tree | 614e31fa1a393656527371dac128f0f6d83289fd /ash/system/tray | |
parent | b334713bb91638bff425bb1831fb4ba460966dcd (diff) | |
download | chromium_src-b1c37fc29acdd561962de77b868dafe1f9a804ee.zip chromium_src-b1c37fc29acdd561962de77b868dafe1f9a804ee.tar.gz chromium_src-b1c37fc29acdd561962de77b868dafe1f9a804ee.tar.bz2 |
Changes how we detect whether the launcher should be shown when
auto-hidden to use an EventFilter as well as whether the status area
is showing a bubble. The old code didn't work right because the status
is a separate widget, meaning a mouse exit always gets dispatched.
I'm also fixing a bug in LayerAnimator. Getting the target value was
only looking at the running animation state, not the queued
animations. This was causing confusion because the workspace
animations queue up a couple of animations.
BUG=119296
TEST=see bug, covered by tests too.
R=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9817026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128162 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system/tray')
-rw-r--r-- | ash/system/tray/system_tray.cc | 4 | ||||
-rw-r--r-- | ash/system/tray/system_tray.h | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc index 2a93faf..f7b0308 100644 --- a/ash/system/tray/system_tray.cc +++ b/ash/system/tray/system_tray.cc @@ -12,6 +12,7 @@ #include "ash/system/tray/system_tray_item.h" #include "ash/system/user/login_status.h" #include "ash/wm/shadow_types.h" +#include "ash/wm/shelf_layout_manager.h" #include "ash/wm/window_animations.h" #include "base/logging.h" #include "base/timer.h" @@ -528,6 +529,8 @@ void SystemTray::ShowItems(std::vector<SystemTrayItem*>& items, base::TimeDelta::FromMilliseconds(kAnimationDurationForPopupMS)); bubble_->Show(); + + Shell::GetInstance()->shelf()->UpdateAutoHideState(); } bool SystemTray::OnKeyPressed(const views::KeyEvent& event) { @@ -575,6 +578,7 @@ void SystemTray::OnWidgetClosing(views::Widget* widget) { CHECK_EQ(popup_, widget); popup_ = NULL; bubble_ = NULL; + Shell::GetInstance()->shelf()->UpdateAutoHideState(); } void SystemTray::UpdateBackground(int alpha) { diff --git a/ash/system/tray/system_tray.h b/ash/system/tray/system_tray.h index fc2fdc1..ce72c92 100644 --- a/ash/system/tray/system_tray.h +++ b/ash/system/tray/system_tray.h @@ -62,6 +62,9 @@ class ASH_EXPORT SystemTray : public views::View, // Updates the items when the login status of the system changes. void UpdateAfterLoginStatusChange(user::LoginStatus login_status); + // Returns true if a bubble is currently showing. + bool showing_bubble() const { return bubble_ != NULL; } + const ScopedVector<SystemTrayItem>& items() const { return items_; } // Sets whether the tray paints a background. Default is true, but is set to |