Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: ash/system/status_area_widget.cc

Issue 11759021: Block the autohide of the launcher when 'quiet mode' bubble is shown for notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/system/web_notification/web_notification_tray.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/system/status_area_widget.h" 5 #include "ash/system/status_area_widget.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_delegate.h" 9 #include "ash/shell_delegate.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // in the destructor if Shutdown() is not called (e.g. in tests). 63 // in the destructor if Shutdown() is not called (e.g. in tests).
64 delete web_notification_tray_; 64 delete web_notification_tray_;
65 web_notification_tray_ = NULL; 65 web_notification_tray_ = NULL;
66 delete system_tray_; 66 delete system_tray_;
67 system_tray_ = NULL; 67 system_tray_ = NULL;
68 } 68 }
69 69
70 bool StatusAreaWidget::ShouldShowLauncher() const { 70 bool StatusAreaWidget::ShouldShowLauncher() const {
71 if ((system_tray_ && system_tray_->ShouldShowLauncher()) || 71 if ((system_tray_ && system_tray_->ShouldShowLauncher()) ||
72 (web_notification_tray_ && 72 (web_notification_tray_ &&
73 web_notification_tray_->IsMessageCenterBubbleVisible())) 73 web_notification_tray_->ShouldBlockLauncherAutoHide()))
74 return true; 74 return true;
75 75
76 if (!RootWindowController::ForLauncher(GetNativeView())->shelf()->IsVisible()) 76 if (!RootWindowController::ForLauncher(GetNativeView())->shelf()->IsVisible())
77 return false; 77 return false;
78 78
79 // If the launcher is currently visible, don't hide the launcher if the mouse 79 // If the launcher is currently visible, don't hide the launcher if the mouse
80 // is in any of the notification bubbles. 80 // is in any of the notification bubbles.
81 return (system_tray_ && system_tray_->IsMouseInNotificationBubble()) || 81 return (system_tray_ && system_tray_->IsMouseInNotificationBubble()) ||
82 (web_notification_tray_ && 82 (web_notification_tray_ &&
83 web_notification_tray_->IsMouseInNotificationBubble()); 83 web_notification_tray_->IsMouseInNotificationBubble());
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 return; 137 return;
138 login_status_ = login_status; 138 login_status_ = login_status;
139 if (system_tray_) 139 if (system_tray_)
140 system_tray_->UpdateAfterLoginStatusChange(login_status); 140 system_tray_->UpdateAfterLoginStatusChange(login_status);
141 if (web_notification_tray_) 141 if (web_notification_tray_)
142 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); 142 web_notification_tray_->UpdateAfterLoginStatusChange(login_status);
143 } 143 }
144 144
145 } // namespace internal 145 } // namespace internal
146 } // namespace ash 146 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/system/web_notification/web_notification_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698