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()); | |
oshima
2012/10/10 17:58:23
Any reason this isn't Shell::GetAshScreen() ?
scottmg
2012/10/10 19:04:47
Done.
| |
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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
466 ConvertPointToWidget(this, &point); | 467 ConvertPointToWidget(this, &point); |
467 arrow_offset = point.x(); | 468 arrow_offset = point.x(); |
468 } | 469 } |
469 } | 470 } |
470 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); | 471 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); |
471 } | 472 } |
472 return true; | 473 return true; |
473 } | 474 } |
474 | 475 |
475 } // namespace ash | 476 } // namespace ash |
OLD | NEW |