| 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 14 matching lines...) Expand all Loading... |
| 73 #include "chrome/browser/policy/browser_policy_connector.h" | 74 #include "chrome/browser/policy/browser_policy_connector.h" |
| 74 #include "chrome/browser/profiles/profile_manager.h" | 75 #include "chrome/browser/profiles/profile_manager.h" |
| 75 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" | 76 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" |
| 76 #include "chrome/browser/ui/browser.h" | 77 #include "chrome/browser/ui/browser.h" |
| 77 #include "chrome/browser/ui/browser_finder.h" | 78 #include "chrome/browser/ui/browser_finder.h" |
| 78 #include "chrome/browser/ui/chrome_pages.h" | 79 #include "chrome/browser/ui/chrome_pages.h" |
| 79 #include "chrome/browser/ui/host_desktop.h" | 80 #include "chrome/browser/ui/host_desktop.h" |
| 80 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" | 81 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" |
| 81 #include "chrome/browser/ui/singleton_tabs.h" | 82 #include "chrome/browser/ui/singleton_tabs.h" |
| 82 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 83 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 84 #include "chrome/browser/ui/webui/chromeos/charger_replacement_handler.h" |
| 83 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h" | 85 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h" |
| 84 #include "chrome/browser/upgrade_detector.h" | 86 #include "chrome/browser/upgrade_detector.h" |
| 85 #include "chrome/common/pref_names.h" | 87 #include "chrome/common/pref_names.h" |
| 86 #include "chrome/common/url_constants.h" | 88 #include "chrome/common/url_constants.h" |
| 87 #include "chromeos/chromeos_switches.h" | 89 #include "chromeos/chromeos_switches.h" |
| 88 #include "chromeos/dbus/dbus_thread_manager.h" | 90 #include "chromeos/dbus/dbus_thread_manager.h" |
| 89 #include "chromeos/dbus/session_manager_client.h" | 91 #include "chromeos/dbus/session_manager_client.h" |
| 90 #include "chromeos/ime/extension_ime_util.h" | 92 #include "chromeos/ime/extension_ime_util.h" |
| 91 #include "chromeos/ime/input_method_manager.h" | 93 #include "chromeos/ime/input_method_manager.h" |
| 92 #include "chromeos/ime/xkeyboard.h" | 94 #include "chromeos/ime/xkeyboard.h" |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 | 612 |
| 611 if (static_cast<int>(UserManager::Get()->GetLoggedInUsers().size()) >= | 613 if (static_cast<int>(UserManager::Get()->GetLoggedInUsers().size()) >= |
| 612 shell->session_state_delegate()->GetMaximumNumberOfLoggedInUsers()) | 614 shell->session_state_delegate()->GetMaximumNumberOfLoggedInUsers()) |
| 613 return; | 615 return; |
| 614 | 616 |
| 615 // Launch sign in screen to add another user to current session. | 617 // Launch sign in screen to add another user to current session. |
| 616 if (UserManager::Get()->GetUsersAdmittedForMultiProfile().size()) | 618 if (UserManager::Get()->GetUsersAdmittedForMultiProfile().size()) |
| 617 UserAddingScreen::Get()->Start(); | 619 UserAddingScreen::Get()->Start(); |
| 618 } | 620 } |
| 619 | 621 |
| 622 virtual void ShowSpringChargerReplacementDialog() OVERRIDE { |
| 623 if (!ChargerReplacementDialog::ShouldShowDialog()) |
| 624 return; |
| 625 |
| 626 ChargerReplacementDialog* dialog = |
| 627 new ChargerReplacementDialog(GetNativeWindow()); |
| 628 dialog->Show(); |
| 629 } |
| 630 |
| 631 virtual bool HasUserConfirmedSafeSpringCharger() OVERRIDE { |
| 632 return ChargerReplacementHandler::GetChargerStatusPref() == |
| 633 ChargerReplacementHandler::CONFIRM_SAFE_CHARGER; |
| 634 } |
| 635 |
| 620 virtual void ShutDown() OVERRIDE { | 636 virtual void ShutDown() OVERRIDE { |
| 621 ash::Shell::GetInstance()->lock_state_controller()->RequestShutdown(); | 637 ash::Shell::GetInstance()->lock_state_controller()->RequestShutdown(); |
| 622 } | 638 } |
| 623 | 639 |
| 624 virtual void SignOut() OVERRIDE { | 640 virtual void SignOut() OVERRIDE { |
| 625 chrome::AttemptUserExit(); | 641 chrome::AttemptUserExit(); |
| 626 } | 642 } |
| 627 | 643 |
| 628 virtual void RequestLockScreen() OVERRIDE { | 644 virtual void RequestLockScreen() OVERRIDE { |
| 629 // TODO(antrim) : additional logging for crbug/173178 | 645 // 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); | 1254 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 1239 }; | 1255 }; |
| 1240 | 1256 |
| 1241 } // namespace | 1257 } // namespace |
| 1242 | 1258 |
| 1243 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1259 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1244 return new chromeos::SystemTrayDelegate(); | 1260 return new chromeos::SystemTrayDelegate(); |
| 1245 } | 1261 } |
| 1246 | 1262 |
| 1247 } // namespace chromeos | 1263 } // namespace chromeos |
| OLD | NEW |