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/common/system/tray/system_tray.h" | 5 #include "ash/common/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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 return l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_ACCESSIBLE_DESCRIPTION, | 531 return l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_ACCESSIBLE_DESCRIPTION, |
532 time, battery); | 532 time, battery); |
533 } | 533 } |
534 | 534 |
535 void SystemTray::ShowItems(const std::vector<SystemTrayItem*>& items, | 535 void SystemTray::ShowItems(const std::vector<SystemTrayItem*>& items, |
536 bool detailed, | 536 bool detailed, |
537 bool can_activate, | 537 bool can_activate, |
538 BubbleCreationType creation_type, | 538 BubbleCreationType creation_type, |
539 bool persistent) { | 539 bool persistent) { |
540 // No system tray bubbles in kiosk mode. | 540 // No system tray bubbles in kiosk mode. |
541 if (WmShell::Get()->system_tray_delegate()->GetUserLoginStatus() == | 541 SystemTrayDelegate* system_tray_delegate = |
542 LoginStatus::KIOSK_APP) { | 542 WmShell::Get()->system_tray_delegate(); |
| 543 if (system_tray_delegate->GetUserLoginStatus() == LoginStatus::KIOSK_APP || |
| 544 system_tray_delegate->GetUserLoginStatus() == |
| 545 LoginStatus::ARC_KIOSK_APP) { |
543 return; | 546 return; |
544 } | 547 } |
545 | 548 |
546 // Destroy any existing bubble and create a new one. | 549 // Destroy any existing bubble and create a new one. |
547 SystemTrayBubble::BubbleType bubble_type = | 550 SystemTrayBubble::BubbleType bubble_type = |
548 detailed ? SystemTrayBubble::BUBBLE_TYPE_DETAILED | 551 detailed ? SystemTrayBubble::BUBBLE_TYPE_DETAILED |
549 : SystemTrayBubble::BUBBLE_TYPE_DEFAULT; | 552 : SystemTrayBubble::BUBBLE_TYPE_DEFAULT; |
550 | 553 |
551 // Destroy the notification bubble here so that it doesn't get rebuilt | 554 // Destroy the notification bubble here so that it doesn't get rebuilt |
552 // while we add items to the main bubble_ (e.g. in HideNotificationView). | 555 // while we add items to the main bubble_ (e.g. in HideNotificationView). |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 .work_area() | 908 .work_area() |
906 .height(); | 909 .height(); |
907 if (work_area_height > 0) { | 910 if (work_area_height > 0) { |
908 UMA_HISTOGRAM_CUSTOM_COUNTS( | 911 UMA_HISTOGRAM_CUSTOM_COUNTS( |
909 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", | 912 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", |
910 100 * bubble_view->height() / work_area_height, 1, 300, 100); | 913 100 * bubble_view->height() / work_area_height, 1, 300, 100); |
911 } | 914 } |
912 } | 915 } |
913 | 916 |
914 } // namespace ash | 917 } // namespace ash |
OLD | NEW |