diff options
author | mukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-05 21:55:37 +0000 |
---|---|---|
committer | mukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-05 21:55:37 +0000 |
commit | 9e55edb1d93c34b21fc31b25009c40804f2f4301 (patch) | |
tree | e813cdddb87f2151568aa718cf045075b6ccb825 /ash | |
parent | e44fd8f860d4f88b21fab0447c356ea2b7b22691 (diff) | |
download | chromium_src-9e55edb1d93c34b21fc31b25009c40804f2f4301.zip chromium_src-9e55edb1d93c34b21fc31b25009c40804f2f4301.tar.gz chromium_src-9e55edb1d93c34b21fc31b25009c40804f2f4301.tar.bz2 |
Sets close_on_deactivate to tray and message center bubbles.
These bubbles will be closed differently (such like ClickedOutsideBubble()),
so no need to have this flag. If this flag is on, the close event may arrive
before the button clicks, so the button click doesn't toggle the bubble.
Also this CL changes the handler of ClickedOutsideBubble(). The tray's widget
will contain both of web notification icons and system tray, but the outside
should mean only the outside of the tray view's bounds.
BUG=169940
TEST=click to open the tray and click the tray icon to close the tray.
Review URL: https://chromiumcodereview.appspot.com/12217004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180792 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_event_filter.cc | 2 | ||||
-rw-r--r-- | ash/system/web_notification/web_notification_tray.cc | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc index aef52bf..c5d165a 100644 --- a/ash/system/tray/system_tray.cc +++ b/ash/system/tray/system_tray.cc @@ -363,6 +363,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_event_filter.cc b/ash/system/tray/tray_event_filter.cc index b91315a..48211ea 100644 --- a/ash/system/tray/tray_event_filter.cc +++ b/ash/system/tray/tray_event_filter.cc @@ -70,7 +70,7 @@ bool TrayEventFilter::ProcessLocatedEvent(ui::LocatedEvent* event) { if (wrapper_->tray()) { // If the user clicks on the parent tray, don't process the event here, // let the tray logic handle the event and determine show/hide behavior. - bounds = wrapper_->tray()->GetWidget()->GetClientAreaBoundsInScreen(); + bounds = wrapper_->tray()->GetBoundsInScreen(); if (bounds.Contains(screen_point)) return false; } diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc index a6d92e7..f5672d8 100644 --- a/ash/system/web_notification/web_notification_tray.cc +++ b/ash/system/web_notification/web_notification_tray.cc @@ -57,6 +57,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); |