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

Side by Side Diff: ash/system/web_notification/web_notification_tray.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 | « ash/system/web_notification/web_notification_tray.h ('k') | no next file » | 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/web_notification/web_notification_tray.h" 5 #include "ash/system/web_notification/web_notification_tray.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/system/status_area_widget.h" 9 #include "ash/system/status_area_widget.h"
10 #include "ash/system/tray/tray_bubble_wrapper.h" 10 #include "ash/system/tray/tray_bubble_wrapper.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 194 }
195 HidePopupBubble(); 195 HidePopupBubble();
196 } else { 196 } else {
197 if (show_message_center_on_unlock_) 197 if (show_message_center_on_unlock_)
198 ShowMessageCenterBubble(); 198 ShowMessageCenterBubble();
199 show_message_center_on_unlock_ = false; 199 show_message_center_on_unlock_ = false;
200 } 200 }
201 UpdateTray(); 201 UpdateTray();
202 } 202 }
203 203
204 bool WebNotificationTray::ShouldBlockLauncherAutoHide() const {
205 return IsMessageCenterBubbleVisible() || quiet_mode_bubble() != NULL;
206 }
207
204 bool WebNotificationTray::IsMessageCenterBubbleVisible() const { 208 bool WebNotificationTray::IsMessageCenterBubbleVisible() const {
205 return (message_center_bubble() && 209 return (message_center_bubble() &&
206 message_center_bubble_->bubble()->IsVisible()); 210 message_center_bubble_->bubble()->IsVisible());
207 } 211 }
208 212
209 bool WebNotificationTray::IsMouseInNotificationBubble() const { 213 bool WebNotificationTray::IsMouseInNotificationBubble() const {
210 if (!popup_bubble()) 214 if (!popup_bubble())
211 return false; 215 return false;
212 return popup_bubble_->bubble_view()->GetBoundsInScreen().Contains( 216 return popup_bubble_->bubble_view()->GetBoundsInScreen().Contains(
213 Shell::GetScreen()->GetCursorScreenPoint()); 217 Shell::GetScreen()->GetCursorScreenPoint());
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 390
387 message_center::MessagePopupBubble* 391 message_center::MessagePopupBubble*
388 WebNotificationTray::GetPopupBubbleForTest() { 392 WebNotificationTray::GetPopupBubbleForTest() {
389 if (!popup_bubble_.get()) 393 if (!popup_bubble_.get())
390 return NULL; 394 return NULL;
391 return static_cast<message_center::MessagePopupBubble*>( 395 return static_cast<message_center::MessagePopupBubble*>(
392 popup_bubble_->bubble()); 396 popup_bubble_->bubble());
393 } 397 }
394 398
395 } // namespace ash 399 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/web_notification/web_notification_tray.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698