| Index: ash/common/system/tray/system_tray.cc
|
| diff --git a/ash/common/system/tray/system_tray.cc b/ash/common/system/tray/system_tray.cc
|
| index 06c41736db80c751fe9b728fd7b3d5ee54f8ad6a..232458f9e10f274b54d512ffdd7ffd9a02a75304 100644
|
| --- a/ash/common/system/tray/system_tray.cc
|
| +++ b/ash/common/system/tray/system_tray.cc
|
| @@ -418,6 +418,7 @@ bool SystemTray::IsMouseInNotificationBubble() const {
|
| bool SystemTray::CloseSystemBubble() const {
|
| if (!system_bubble_)
|
| return false;
|
| + CHECK(!activating_);
|
| system_bubble_->bubble()->Close();
|
| return true;
|
| }
|
| @@ -792,7 +793,13 @@ void SystemTray::CloseBubble(const ui::KeyEvent& key_event) {
|
| void SystemTray::ActivateAndStartNavigation(const ui::KeyEvent& key_event) {
|
| if (!system_bubble_)
|
| return;
|
| + activating_ = true;
|
| ActivateBubble();
|
| + activating_ = false;
|
| + // TODO(oshima): This is to troubleshoot the issue crbug.com/651242. Remove
|
| + // once the root cause is fixed.
|
| + CHECK(system_bubble_) << " the bubble was deleted while activaing it";
|
| +
|
| views::Widget* widget = GetSystemBubble()->bubble_view()->GetWidget();
|
| widget->GetFocusManager()->OnKeyEvent(key_event);
|
| }
|
| @@ -845,6 +852,7 @@ bool SystemTray::PerformAction(const ui::Event& event) {
|
| }
|
|
|
| void SystemTray::CloseSystemBubbleAndDeactivateSystemTray() {
|
| + CHECK(!activating_);
|
| activation_observer_.reset();
|
| key_event_watcher_.reset();
|
| system_bubble_.reset();
|
|
|