| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 } | 582 } |
| 583 | 583 |
| 584 base::string16 SystemTray::GetAccessibleNameForBubble() { | 584 base::string16 SystemTray::GetAccessibleNameForBubble() { |
| 585 return GetAccessibleNameForTray(); | 585 return GetAccessibleNameForTray(); |
| 586 } | 586 } |
| 587 | 587 |
| 588 void SystemTray::HideBubble(const TrayBubbleView* bubble_view) { | 588 void SystemTray::HideBubble(const TrayBubbleView* bubble_view) { |
| 589 HideBubbleWithView(bubble_view); | 589 HideBubbleWithView(bubble_view); |
| 590 } | 590 } |
| 591 | 591 |
| 592 TrayCast* SystemTray::GetTrayCastForTesting() const { | |
| 593 return tray_cast_; | |
| 594 } | |
| 595 | |
| 596 TrayEnterprise* SystemTray::GetTrayEnterpriseForTesting() const { | |
| 597 return tray_enterprise_; | |
| 598 } | |
| 599 | |
| 600 TrayNetwork* SystemTray::GetTrayNetworkForTesting() const { | |
| 601 return tray_network_; | |
| 602 } | |
| 603 | |
| 604 TraySessionLengthLimit* SystemTray::GetTraySessionLengthLimitForTesting() | |
| 605 const { | |
| 606 return tray_session_length_limit_; | |
| 607 } | |
| 608 | |
| 609 TraySupervisedUser* SystemTray::GetTraySupervisedUserForTesting() const { | |
| 610 return tray_supervised_user_; | |
| 611 } | |
| 612 | |
| 613 TraySystemInfo* SystemTray::GetTraySystemInfoForTesting() const { | |
| 614 return tray_system_info_; | |
| 615 } | |
| 616 | |
| 617 TrayTiles* SystemTray::GetTrayTilesForTesting() const { | |
| 618 return tray_tiles_; | |
| 619 } | |
| 620 | |
| 621 void SystemTray::CloseBubble(const ui::KeyEvent& key_event) { | 592 void SystemTray::CloseBubble(const ui::KeyEvent& key_event) { |
| 622 CloseSystemBubble(); | 593 CloseSystemBubble(); |
| 623 } | 594 } |
| 624 | 595 |
| 625 void SystemTray::ActivateAndStartNavigation(const ui::KeyEvent& key_event) { | 596 void SystemTray::ActivateAndStartNavigation(const ui::KeyEvent& key_event) { |
| 626 if (!system_bubble_) | 597 if (!system_bubble_) |
| 627 return; | 598 return; |
| 628 ActivateBubble(); | 599 ActivateBubble(); |
| 629 | 600 |
| 630 views::Widget* widget = GetSystemBubble()->bubble_view()->GetWidget(); | 601 views::Widget* widget = GetSystemBubble()->bubble_view()->GetWidget(); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 .work_area() | 678 .work_area() |
| 708 .height(); | 679 .height(); |
| 709 if (work_area_height > 0) { | 680 if (work_area_height > 0) { |
| 710 UMA_HISTOGRAM_CUSTOM_COUNTS( | 681 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 711 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", | 682 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", |
| 712 100 * bubble_view->height() / work_area_height, 1, 300, 100); | 683 100 * bubble_view->height() / work_area_height, 1, 300, 100); |
| 713 } | 684 } |
| 714 } | 685 } |
| 715 | 686 |
| 716 } // namespace ash | 687 } // namespace ash |
| OLD | NEW |