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

Side by Side Diff: ash/system/tray/system_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/shell.cc ('k') | ash/system/tray/tray_background_view.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/tray/system_tray.h" 5 #include "ash/system/tray/system_tray.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell/panel_window.h" 8 #include "ash/shell/panel_window.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/system/audio/tray_volume.h" 10 #include "ash/system/audio/tray_volume.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 return true; 241 return true;
242 if (notification_bubble_.get() && notification_bubble_->IsVisible()) 242 if (notification_bubble_.get() && notification_bubble_->IsVisible())
243 return true; 243 return true;
244 return false; 244 return false;
245 } 245 }
246 246
247 bool SystemTray::IsMouseInNotificationBubble() const { 247 bool SystemTray::IsMouseInNotificationBubble() const {
248 if (!notification_bubble_.get()) 248 if (!notification_bubble_.get())
249 return false; 249 return false;
250 return notification_bubble_->bubble_view()->GetBoundsInScreen().Contains( 250 return notification_bubble_->bubble_view()->GetBoundsInScreen().Contains(
251 gfx::Screen::GetCursorScreenPoint()); 251 Shell::GetScreen()->GetCursorScreenPoint());
252 } 252 }
253 253
254 bool SystemTray::CloseBubbleForTest() const { 254 bool SystemTray::CloseBubbleForTest() const {
255 if (!bubble_.get()) 255 if (!bubble_.get())
256 return false; 256 return false;
257 bubble_->Close(); 257 bubble_->Close();
258 return true; 258 return true;
259 } 259 }
260 260
261 // Private methods. 261 // Private methods.
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 ConvertPointToWidget(this, &point); 466 ConvertPointToWidget(this, &point);
467 arrow_offset = point.x(); 467 arrow_offset = point.x();
468 } 468 }
469 } 469 }
470 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); 470 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset);
471 } 471 }
472 return true; 472 return true;
473 } 473 }
474 474
475 } // namespace ash 475 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ash/system/tray/tray_background_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698