OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" | 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 chrome::ShowSingletonTab(displayer.browser(), | 546 chrome::ShowSingletonTab(displayer.browser(), |
547 GURL(chrome::kLearnMoreEnterpriseURL)); | 547 GURL(chrome::kLearnMoreEnterpriseURL)); |
548 } | 548 } |
549 } | 549 } |
550 | 550 |
551 void SystemTrayDelegateChromeOS::ShowUserLogin() { | 551 void SystemTrayDelegateChromeOS::ShowUserLogin() { |
552 ash::Shell* shell = ash::Shell::GetInstance(); | 552 ash::Shell* shell = ash::Shell::GetInstance(); |
553 if (!shell->delegate()->IsMultiProfilesEnabled()) | 553 if (!shell->delegate()->IsMultiProfilesEnabled()) |
554 return; | 554 return; |
555 | 555 |
556 // Only regular users could add other users to current session. | 556 // Only regular non-supervised users could add other users to current session. |
557 if (user_manager::UserManager::Get()->GetActiveUser()->GetType() != | 557 if (user_manager::UserManager::Get()->GetActiveUser()->GetType() != |
558 user_manager::USER_TYPE_REGULAR) { | 558 user_manager::USER_TYPE_REGULAR) { |
559 return; | 559 return; |
560 } | 560 } |
561 | 561 |
562 if (static_cast<int>( | 562 if (static_cast<int>( |
563 user_manager::UserManager::Get()->GetLoggedInUsers().size()) >= | 563 user_manager::UserManager::Get()->GetLoggedInUsers().size()) >= |
564 shell->session_state_delegate()->GetMaximumNumberOfLoggedInUsers()) | 564 shell->session_state_delegate()->GetMaximumNumberOfLoggedInUsers()) |
565 return; | 565 return; |
566 | 566 |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1311 accessibility_subscription_.reset(); | 1311 accessibility_subscription_.reset(); |
1312 else | 1312 else |
1313 OnAccessibilityModeChanged(details.notify); | 1313 OnAccessibilityModeChanged(details.notify); |
1314 } | 1314 } |
1315 | 1315 |
1316 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1316 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
1317 return new SystemTrayDelegateChromeOS(); | 1317 return new SystemTrayDelegateChromeOS(); |
1318 } | 1318 } |
1319 | 1319 |
1320 } // namespace chromeos | 1320 } // namespace chromeos |
OLD | NEW |