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

Side by Side Diff: ash/system/web_notification/web_notification_tray.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix new addition Created 8 years, 2 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/tray/tray_bubble_view.cc ('k') | ash/test/ash_test_base.cc » ('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/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/system/status_area_widget.h" 8 #include "ash/system/status_area_widget.h"
9 #include "ash/system/tray/tray_bubble_view.h" 9 #include "ash/system/tray/tray_bubble_view.h"
10 #include "ash/system/tray/tray_constants.h" 10 #include "ash/system/tray/tray_constants.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 195 }
196 196
197 bool WebNotificationTray::IsMessageCenterBubbleVisible() const { 197 bool WebNotificationTray::IsMessageCenterBubbleVisible() const {
198 return (message_center_bubble() && message_center_bubble_->IsVisible()); 198 return (message_center_bubble() && message_center_bubble_->IsVisible());
199 } 199 }
200 200
201 bool WebNotificationTray::IsMouseInNotificationBubble() const { 201 bool WebNotificationTray::IsMouseInNotificationBubble() const {
202 if (!popup_bubble()) 202 if (!popup_bubble())
203 return false; 203 return false;
204 return popup_bubble_->bubble_view()->GetBoundsInScreen().Contains( 204 return popup_bubble_->bubble_view()->GetBoundsInScreen().Contains(
205 gfx::Screen::GetCursorScreenPoint()); 205 Shell::GetScreen()->GetCursorScreenPoint());
206 } 206 }
207 207
208 void WebNotificationTray::SetShelfAlignment(ShelfAlignment alignment) { 208 void WebNotificationTray::SetShelfAlignment(ShelfAlignment alignment) {
209 if (alignment == shelf_alignment()) 209 if (alignment == shelf_alignment())
210 return; 210 return;
211 internal::TrayBackgroundView::SetShelfAlignment(alignment); 211 internal::TrayBackgroundView::SetShelfAlignment(alignment);
212 // Destroy any existing bubble so that it will be rebuilt correctly. 212 // Destroy any existing bubble so that it will be rebuilt correctly.
213 HideMessageCenterBubble(); 213 HideMessageCenterBubble();
214 HidePopupBubble(); 214 HidePopupBubble();
215 } 215 }
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 return message_center_bubble()->NumMessageViewsForTest(); 378 return message_center_bubble()->NumMessageViewsForTest();
379 } 379 }
380 380
381 size_t WebNotificationTray::GetPopupNotificationCountForTest() const { 381 size_t WebNotificationTray::GetPopupNotificationCountForTest() const {
382 if (!popup_bubble()) 382 if (!popup_bubble())
383 return 0; 383 return 0;
384 return popup_bubble()->NumMessageViewsForTest(); 384 return popup_bubble()->NumMessageViewsForTest();
385 } 385 }
386 386
387 } // namespace ash 387 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/tray_bubble_view.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698