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

Side by Side Diff: ash/system/tray/system_tray.cc

Issue 2931643002: chromeos: Introduce ash::SystemTrayTestApi (Closed)
Patch Set: Created 3 years, 6 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
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 <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 } 581 }
582 582
583 base::string16 SystemTray::GetAccessibleNameForBubble() { 583 base::string16 SystemTray::GetAccessibleNameForBubble() {
584 return GetAccessibleNameForTray(); 584 return GetAccessibleNameForTray();
585 } 585 }
586 586
587 void SystemTray::HideBubble(const TrayBubbleView* bubble_view) { 587 void SystemTray::HideBubble(const TrayBubbleView* bubble_view) {
588 HideBubbleWithView(bubble_view); 588 HideBubbleWithView(bubble_view);
589 } 589 }
590 590
591 TrayCast* SystemTray::GetTrayCastForTesting() const {
592 return tray_cast_;
593 }
594
595 TrayEnterprise* SystemTray::GetTrayEnterpriseForTesting() const {
596 return tray_enterprise_;
597 }
598
599 TrayNetwork* SystemTray::GetTrayNetworkForTesting() const {
600 return tray_network_;
601 }
602
603 TraySupervisedUser* SystemTray::GetTraySupervisedUserForTesting() const {
604 return tray_supervised_user_;
605 }
606
607 TraySystemInfo* SystemTray::GetTraySystemInfoForTesting() const {
608 return tray_system_info_;
609 }
610
611 TrayTiles* SystemTray::GetTrayTilesForTesting() const {
612 return tray_tiles_;
613 }
614
615 void SystemTray::CloseBubble(const ui::KeyEvent& key_event) { 591 void SystemTray::CloseBubble(const ui::KeyEvent& key_event) {
616 CloseSystemBubble(); 592 CloseSystemBubble();
617 } 593 }
618 594
619 void SystemTray::ActivateAndStartNavigation(const ui::KeyEvent& key_event) { 595 void SystemTray::ActivateAndStartNavigation(const ui::KeyEvent& key_event) {
620 if (!system_bubble_) 596 if (!system_bubble_)
621 return; 597 return;
622 ActivateBubble(); 598 ActivateBubble();
623 599
624 views::Widget* widget = GetSystemBubble()->bubble_view()->GetWidget(); 600 views::Widget* widget = GetSystemBubble()->bubble_view()->GetWidget();
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 .work_area() 677 .work_area()
702 .height(); 678 .height();
703 if (work_area_height > 0) { 679 if (work_area_height > 0) {
704 UMA_HISTOGRAM_CUSTOM_COUNTS( 680 UMA_HISTOGRAM_CUSTOM_COUNTS(
705 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", 681 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu",
706 100 * bubble_view->height() / work_area_height, 1, 300, 100); 682 100 * bubble_view->height() / work_area_height, 1, 300, 100);
707 } 683 }
708 } 684 }
709 685
710 } // namespace ash 686 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698