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/chrome_browser_main_chromeos.h" | 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "base/string_number_conversions.h" | 12 #include "base/string_number_conversions.h" |
13 #include "chrome/browser/browser_process_impl.h" | 13 #include "chrome/browser/browser_process_impl.h" |
14 #include "chrome/browser/chromeos/audio/audio_handler.h" | 14 #include "chrome/browser/chromeos/audio/audio_handler.h" |
15 #include "chrome/browser/chromeos/bluetooth/bluetooth_manager.h" | 15 #include "chrome/browser/chromeos/bluetooth/bluetooth_manager.h" |
16 #include "chrome/browser/chromeos/boot_times_loader.h" | 16 #include "chrome/browser/chromeos/boot_times_loader.h" |
17 #include "chrome/browser/chromeos/boot_times_loader.h" | 17 #include "chrome/browser/chromeos/boot_times_loader.h" |
18 #include "chrome/browser/chromeos/cros/cros_library.h" | 18 #include "chrome/browser/chromeos/cros/cros_library.h" |
19 #include "chrome/browser/chromeos/cros/cros_library.h" | 19 #include "chrome/browser/chromeos/cros/cros_library.h" |
20 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 20 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
21 #include "chrome/browser/chromeos/dbus/power_manager_client.h" | 21 #include "chrome/browser/chromeos/dbus/power_manager_client.h" |
22 #include "chrome/browser/chromeos/dbus/session_manager_client.h" | 22 #include "chrome/browser/chromeos/dbus/session_manager_client.h" |
23 #include "chrome/browser/chromeos/disks/disk_mount_manager.h" | 23 #include "chrome/browser/chromeos/disks/disk_mount_manager.h" |
24 #include "chrome/browser/chromeos/external_metrics.h" | 24 #include "chrome/browser/chromeos/external_metrics.h" |
25 #include "chrome/browser/chromeos/imageburner/burn_manager.h" | 25 #include "chrome/browser/chromeos/imageburner/burn_manager.h" |
26 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 26 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
27 #include "chrome/browser/chromeos/input_method/xkeyboard.h" | 27 #include "chrome/browser/chromeos/input_method/xkeyboard.h" |
| 28 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h" |
28 #include "chrome/browser/chromeos/login/authenticator.h" | 29 #include "chrome/browser/chromeos/login/authenticator.h" |
29 #include "chrome/browser/chromeos/login/login_utils.h" | 30 #include "chrome/browser/chromeos/login/login_utils.h" |
30 #include "chrome/browser/chromeos/login/ownership_service.h" | 31 #include "chrome/browser/chromeos/login/ownership_service.h" |
31 #include "chrome/browser/chromeos/login/screen_locker.h" | 32 #include "chrome/browser/chromeos/login/screen_locker.h" |
32 #include "chrome/browser/chromeos/login/session_manager_observer.h" | 33 #include "chrome/browser/chromeos/login/session_manager_observer.h" |
33 #include "chrome/browser/chromeos/login/user_manager.h" | 34 #include "chrome/browser/chromeos/login/user_manager.h" |
34 #include "chrome/browser/chromeos/net/cros_network_change_notifier_factory.h" | 35 #include "chrome/browser/chromeos/net/cros_network_change_notifier_factory.h" |
35 #include "chrome/browser/chromeos/net/network_change_notifier_chromeos.h" | 36 #include "chrome/browser/chromeos/net/network_change_notifier_chromeos.h" |
36 #include "chrome/browser/chromeos/power/brightness_observer.h" | 37 #include "chrome/browser/chromeos/power/brightness_observer.h" |
37 #include "chrome/browser/chromeos/power/resume_observer.h" | 38 #include "chrome/browser/chromeos/power/resume_observer.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 if (size_arg.size()) { | 191 if (size_arg.size()) { |
191 std::vector<std::string> dimensions; | 192 std::vector<std::string> dimensions; |
192 base::SplitString(size_arg, ',', &dimensions); | 193 base::SplitString(size_arg, ',', &dimensions); |
193 if (dimensions.size() == 2) { | 194 if (dimensions.size() == 2) { |
194 int width, height; | 195 int width, height; |
195 if (base::StringToInt(dimensions[0], &width) && | 196 if (base::StringToInt(dimensions[0], &width) && |
196 base::StringToInt(dimensions[1], &height)) | 197 base::StringToInt(dimensions[1], &height)) |
197 size.SetSize(width, height); | 198 size.SetSize(width, height); |
198 } | 199 } |
199 } | 200 } |
| 201 |
200 browser::ShowLoginWizard(first_screen, size); | 202 browser::ShowLoginWizard(first_screen, size); |
| 203 |
| 204 if (parsed_command_line.HasSwitch(switches::kEnableKioskMode)) |
| 205 chromeos::InitKioskModeScreensaver(); |
201 } else if (parsed_command_line.HasSwitch(switches::kLoginUser) && | 206 } else if (parsed_command_line.HasSwitch(switches::kLoginUser) && |
202 parsed_command_line.HasSwitch(switches::kLoginPassword)) { | 207 parsed_command_line.HasSwitch(switches::kLoginPassword)) { |
203 chromeos::BootTimesLoader::Get()->RecordLoginAttempted(); | 208 chromeos::BootTimesLoader::Get()->RecordLoginAttempted(); |
204 new StubLogin( | 209 new StubLogin( |
205 parsed_command_line.GetSwitchValueASCII(switches::kLoginUser), | 210 parsed_command_line.GetSwitchValueASCII(switches::kLoginUser), |
206 parsed_command_line.GetSwitchValueASCII(switches::kLoginPassword)); | 211 parsed_command_line.GetSwitchValueASCII(switches::kLoginPassword)); |
207 } else { | 212 } else { |
208 if (!parsed_command_line.HasSwitch(switches::kTestName)) { | 213 if (!parsed_command_line.HasSwitch(switches::kTestName)) { |
209 // We did not log in (we crashed or are debugging), so we need to | 214 // We did not log in (we crashed or are debugging), so we need to |
210 // restore Sync. | 215 // restore Sync. |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell | 536 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell |
532 // singleton before the shell is destroyed. | 537 // singleton before the shell is destroyed. |
533 video_property_writer_.reset(); | 538 video_property_writer_.reset(); |
534 // Remove PowerButtonObserver attached to a D-Bus client before | 539 // Remove PowerButtonObserver attached to a D-Bus client before |
535 // DBusThreadManager is shut down. | 540 // DBusThreadManager is shut down. |
536 power_button_observer_.reset(); | 541 power_button_observer_.reset(); |
537 #endif | 542 #endif |
538 | 543 |
539 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); | 544 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); |
540 } | 545 } |
OLD | NEW |