diff options
author | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-04 23:36:48 +0000 |
---|---|---|
committer | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-04 23:36:48 +0000 |
commit | 0054e027d8a116598ccbfce520733110d8965fc7 (patch) | |
tree | 23226dba8123ba74efae4dfc2f3288e9c9942108 /ash | |
parent | 7e95a6d21513e464cab6ab69f71fde4824bec3f8 (diff) | |
download | chromium_src-0054e027d8a116598ccbfce520733110d8965fc7.zip chromium_src-0054e027d8a116598ccbfce520733110d8965fc7.tar.gz chromium_src-0054e027d8a116598ccbfce520733110d8965fc7.tar.bz2 |
Revert 184572
This causes a crash when opening settings from the system tray, see crbug.com/184572
> Remove close_on_deactivate=false for tray bubbles.
>
> Actually we want to close those bubbles on deactivation (like, opening
> settings page or opening the chat window for a notification). To deal
> with the race condition of close-on-deactivate and button action,
> a static delay is introduced.
>
> BUG=177075, 169940
> TEST=manually checked with goobuntu, see the bugs for the actual steps
>
>
> Review URL: https://chromiumcodereview.appspot.com/12335044
TBR=mukai@chromium.org
Review URL: https://codereview.chromium.org/12378088
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186028 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/system/tray/system_tray.cc | 1 | ||||
-rw-r--r-- | ash/system/tray/tray_bubble_wrapper.cc | 13 | ||||
-rw-r--r-- | ash/system/web_notification/web_notification_tray.cc | 1 |
3 files changed, 3 insertions, 12 deletions
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc index feb1fb3..0b17757 100644 --- a/ash/system/tray/system_tray.cc +++ b/ash/system/tray/system_tray.cc @@ -364,6 +364,7 @@ void SystemTray::ShowItems(const std::vector<SystemTrayItem*>& items, kTrayPopupMinWidth, kTrayPopupMaxWidth); init_params.can_activate = can_activate; + init_params.close_on_deactivate = false; if (detailed) { // This is the case where a volume control or brightness control bubble // is created. diff --git a/ash/system/tray/tray_bubble_wrapper.cc b/ash/system/tray/tray_bubble_wrapper.cc index c57cc7a..75651c2 100644 --- a/ash/system/tray/tray_bubble_wrapper.cc +++ b/ash/system/tray/tray_bubble_wrapper.cc @@ -7,9 +7,6 @@ #include "ash/system/tray/tray_background_view.h" #include "ash/system/tray/tray_event_filter.h" #include "ash/wm/window_properties.h" -#include "base/bind.h" -#include "base/message_loop.h" -#include "base/time.h" #include "ui/views/bubble/tray_bubble_view.h" #include "ui/views/widget/widget.h" @@ -20,7 +17,6 @@ TrayBubbleWrapper::TrayBubbleWrapper(TrayBackgroundView* tray, views::TrayBubbleView* bubble_view) : tray_(tray), bubble_view_(bubble_view) { - DCHECK(tray_); bubble_widget_ = views::BubbleDelegateView::CreateBubble(bubble_view_); bubble_widget_->AddObserver(this); bubble_widget_->GetNativeView()-> @@ -44,14 +40,7 @@ TrayBubbleWrapper::~TrayBubbleWrapper() { void TrayBubbleWrapper::OnWidgetDestroying(views::Widget* widget) { CHECK_EQ(bubble_widget_, widget); bubble_widget_ = NULL; - - // Do not call HideBubbleWithView directly but post the task to ensure that - // HideBubbleWithView is called after the click event on the tray button is - // handled. See crbug.com/177075 and crbug.com/169940 - MessageLoopForUI::current()->PostTask( - FROM_HERE, - base::Bind(&TrayBackgroundView::HideBubbleWithView, - base::Unretained(tray_), base::Unretained(bubble_view_))); + tray_->HideBubbleWithView(bubble_view_); // May destroy |bubble_view_| } } // namespace internal diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc index 67711a4..998123f 100644 --- a/ash/system/web_notification/web_notification_tray.cc +++ b/ash/system/web_notification/web_notification_tray.cc @@ -61,6 +61,7 @@ class WebNotificationBubbleWrapper { tray->GetAnchorAlignment(); views::TrayBubbleView::InitParams init_params = bubble->GetInitParams(anchor_alignment); + init_params.close_on_deactivate = false; views::View* anchor = tray->tray_container(); if (anchor_alignment == views::TrayBubbleView::ANCHOR_ALIGNMENT_BOTTOM) { gfx::Point bounds(anchor->width() / 2, 0); |