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/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell/panel_window.h" | 10 #include "ash/shell/panel_window.h" |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 notification_bubble_->bubble()->IsVisible())); | 314 notification_bubble_->bubble()->IsVisible())); |
315 } | 315 } |
316 | 316 |
317 bool SystemTray::IsMouseInNotificationBubble() const { | 317 bool SystemTray::IsMouseInNotificationBubble() const { |
318 if (!notification_bubble_) | 318 if (!notification_bubble_) |
319 return false; | 319 return false; |
320 return notification_bubble_->bubble_view()->GetBoundsInScreen().Contains( | 320 return notification_bubble_->bubble_view()->GetBoundsInScreen().Contains( |
321 Shell::GetScreen()->GetCursorScreenPoint()); | 321 Shell::GetScreen()->GetCursorScreenPoint()); |
322 } | 322 } |
323 | 323 |
324 bool SystemTray::CloseSystemBubbleForTest() const { | 324 bool SystemTray::CloseSystemBubble() const { |
325 if (!system_bubble_) | 325 if (!system_bubble_) |
326 return false; | 326 return false; |
327 system_bubble_->bubble()->Close(); | 327 system_bubble_->bubble()->Close(); |
328 return true; | 328 return true; |
329 } | 329 } |
330 | 330 |
331 bool SystemTray::CloseNotificationBubbleForTest() const { | 331 bool SystemTray::CloseNotificationBubbleForTest() const { |
332 if (!notification_bubble_) | 332 if (!notification_bubble_) |
333 return false; | 333 return false; |
334 notification_bubble_->bubble()->Close(); | 334 notification_bubble_->bubble()->Close(); |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 ConvertPointToWidget(this, &point); | 576 ConvertPointToWidget(this, &point); |
577 arrow_offset = point.x(); | 577 arrow_offset = point.x(); |
578 } | 578 } |
579 } | 579 } |
580 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); | 580 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); |
581 } | 581 } |
582 return true; | 582 return true; |
583 } | 583 } |
584 | 584 |
585 } // namespace ash | 585 } // namespace ash |
OLD | NEW |