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

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

Issue 2498613003: Add ARC++ kiosk menu items and ability to start kiosk session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 1 month 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/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
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
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
OLDNEW
« no previous file with comments | « ash/common/system/overview/overview_button_tray.cc ('k') | ash/common/wm/overview/window_selector_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698