OLD | NEW |
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 Loading... |
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 gfx::Screen::GetScreenFor( |
| 252 status_area_widget()->GetNativeView())->GetCursorScreenPoint()); |
252 } | 253 } |
253 | 254 |
254 bool SystemTray::CloseBubbleForTest() const { | 255 bool SystemTray::CloseBubbleForTest() const { |
255 if (!bubble_.get()) | 256 if (!bubble_.get()) |
256 return false; | 257 return false; |
257 bubble_->Close(); | 258 bubble_->Close(); |
258 return true; | 259 return true; |
259 } | 260 } |
260 | 261 |
261 // Private methods. | 262 // Private methods. |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 ConvertPointToWidget(this, &point); | 462 ConvertPointToWidget(this, &point); |
462 arrow_offset = point.x(); | 463 arrow_offset = point.x(); |
463 } | 464 } |
464 } | 465 } |
465 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); | 466 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); |
466 } | 467 } |
467 return true; | 468 return true; |
468 } | 469 } |
469 | 470 |
470 } // namespace ash | 471 } // namespace ash |
OLD | NEW |