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

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 some new gfx::Screen additions 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
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 194 }
195 195
196 bool WebNotificationTray::IsMessageCenterBubbleVisible() const { 196 bool WebNotificationTray::IsMessageCenterBubbleVisible() const {
197 return (message_center_bubble() && message_center_bubble_->IsVisible()); 197 return (message_center_bubble() && message_center_bubble_->IsVisible());
198 } 198 }
199 199
200 bool WebNotificationTray::IsMouseInNotificationBubble() const { 200 bool WebNotificationTray::IsMouseInNotificationBubble() const {
201 if (!popup_bubble()) 201 if (!popup_bubble())
202 return false; 202 return false;
203 return popup_bubble_->bubble_view()->GetBoundsInScreen().Contains( 203 return popup_bubble_->bubble_view()->GetBoundsInScreen().Contains(
204 gfx::Screen::GetCursorScreenPoint()); 204 Shell::GetAshScreen()->GetCursorScreenPoint());
205 } 205 }
206 206
207 void WebNotificationTray::SetShelfAlignment(ShelfAlignment alignment) { 207 void WebNotificationTray::SetShelfAlignment(ShelfAlignment alignment) {
208 if (alignment == shelf_alignment()) 208 if (alignment == shelf_alignment())
209 return; 209 return;
210 internal::TrayBackgroundView::SetShelfAlignment(alignment); 210 internal::TrayBackgroundView::SetShelfAlignment(alignment);
211 // Destroy any existing bubble so that it will be rebuilt correctly. 211 // Destroy any existing bubble so that it will be rebuilt correctly.
212 HideMessageCenterBubble(); 212 HideMessageCenterBubble();
213 HidePopupBubble(); 213 HidePopupBubble();
214 } 214 }
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 return message_center_bubble()->NumMessageViewsForTest(); 377 return message_center_bubble()->NumMessageViewsForTest();
378 } 378 }
379 379
380 size_t WebNotificationTray::GetPopupNotificationCountForTest() const { 380 size_t WebNotificationTray::GetPopupNotificationCountForTest() const {
381 if (!popup_bubble()) 381 if (!popup_bubble())
382 return 0; 382 return 0;
383 return popup_bubble()->NumMessageViewsForTest(); 383 return popup_bubble()->NumMessageViewsForTest();
384 } 384 }
385 385
386 } // namespace ash 386 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698