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 "chrome/browser/chromeos/system/ash_system_tray_delegate.h" | 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.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 28 matching lines...) Expand all Loading... |
39 #include "base/prefs/pref_service.h" | 39 #include "base/prefs/pref_service.h" |
40 #include "base/strings/stringprintf.h" | 40 #include "base/strings/stringprintf.h" |
41 #include "base/strings/utf_string_conversions.h" | 41 #include "base/strings/utf_string_conversions.h" |
42 #include "base/sys_info.h" | 42 #include "base/sys_info.h" |
43 #include "base/time/time.h" | 43 #include "base/time/time.h" |
44 #include "chrome/browser/browser_process.h" | 44 #include "chrome/browser/browser_process.h" |
45 #include "chrome/browser/chrome_notification_types.h" | 45 #include "chrome/browser/chrome_notification_types.h" |
46 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 46 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
47 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 47 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
48 #include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h" | 48 #include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h" |
| 49 #include "chrome/browser/chromeos/charger_replace/charger_replacement_dialog.h" |
49 #include "chrome/browser/chromeos/choose_mobile_network_dialog.h" | 50 #include "chrome/browser/chromeos/choose_mobile_network_dialog.h" |
50 #include "chrome/browser/chromeos/drive/drive_integration_service.h" | 51 #include "chrome/browser/chromeos/drive/drive_integration_service.h" |
51 #include "chrome/browser/chromeos/drive/job_list.h" | 52 #include "chrome/browser/chromeos/drive/job_list.h" |
52 #include "chrome/browser/chromeos/enrollment_dialog_view.h" | 53 #include "chrome/browser/chromeos/enrollment_dialog_view.h" |
53 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 54 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
54 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" | 55 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
55 #include "chrome/browser/chromeos/login/help_app_launcher.h" | 56 #include "chrome/browser/chromeos/login/help_app_launcher.h" |
56 #include "chrome/browser/chromeos/login/login_display_host.h" | 57 #include "chrome/browser/chromeos/login/login_display_host.h" |
57 #include "chrome/browser/chromeos/login/login_display_host_impl.h" | 58 #include "chrome/browser/chromeos/login/login_display_host_impl.h" |
58 #include "chrome/browser/chromeos/login/login_wizard.h" | 59 #include "chrome/browser/chromeos/login/login_wizard.h" |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 | 611 |
611 if (static_cast<int>(UserManager::Get()->GetLoggedInUsers().size()) >= | 612 if (static_cast<int>(UserManager::Get()->GetLoggedInUsers().size()) >= |
612 shell->session_state_delegate()->GetMaximumNumberOfLoggedInUsers()) | 613 shell->session_state_delegate()->GetMaximumNumberOfLoggedInUsers()) |
613 return; | 614 return; |
614 | 615 |
615 // Launch sign in screen to add another user to current session. | 616 // Launch sign in screen to add another user to current session. |
616 if (UserManager::Get()->GetUsersAdmittedForMultiProfile().size()) | 617 if (UserManager::Get()->GetUsersAdmittedForMultiProfile().size()) |
617 UserAddingScreen::Get()->Start(); | 618 UserAddingScreen::Get()->Start(); |
618 } | 619 } |
619 | 620 |
| 621 virtual void ShowSpringChargerReplacementDialog() OVERRIDE { |
| 622 if (!ChargerReplacementDialog::ShouldShowDialog()) |
| 623 return; |
| 624 |
| 625 ChargerReplacementDialog* dialog = |
| 626 new ChargerReplacementDialog(GetNativeWindow()); |
| 627 dialog->Show(); |
| 628 } |
| 629 |
620 virtual void ShutDown() OVERRIDE { | 630 virtual void ShutDown() OVERRIDE { |
621 ash::Shell::GetInstance()->lock_state_controller()->RequestShutdown(); | 631 ash::Shell::GetInstance()->lock_state_controller()->RequestShutdown(); |
622 } | 632 } |
623 | 633 |
624 virtual void SignOut() OVERRIDE { | 634 virtual void SignOut() OVERRIDE { |
625 chrome::AttemptUserExit(); | 635 chrome::AttemptUserExit(); |
626 } | 636 } |
627 | 637 |
628 virtual void RequestLockScreen() OVERRIDE { | 638 virtual void RequestLockScreen() OVERRIDE { |
629 // TODO(antrim) : additional logging for crbug/173178 | 639 // TODO(antrim) : additional logging for crbug/173178 |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1248 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
1239 }; | 1249 }; |
1240 | 1250 |
1241 } // namespace | 1251 } // namespace |
1242 | 1252 |
1243 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1253 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
1244 return new chromeos::SystemTrayDelegate(); | 1254 return new chromeos::SystemTrayDelegate(); |
1245 } | 1255 } |
1246 | 1256 |
1247 } // namespace chromeos | 1257 } // namespace chromeos |
OLD | NEW |