| 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/accessibility/system_event_observer.h" | 14 #include "chrome/browser/chromeos/accessibility/system_event_observer.h" |
| 15 #include "chrome/browser/chromeos/audio/audio_handler.h" | 15 #include "chrome/browser/chromeos/audio/audio_handler.h" |
| 16 #include "chrome/browser/chromeos/bluetooth/bluetooth_manager.h" | 16 #include "chrome/browser/chromeos/bluetooth/bluetooth_manager.h" |
| 17 #include "chrome/browser/chromeos/boot_times_loader.h" | 17 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 18 #include "chrome/browser/chromeos/boot_times_loader.h" | 18 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 19 #include "chrome/browser/chromeos/cros/cros_library.h" | 19 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 20 #include "chrome/browser/chromeos/cros/cros_library.h" | 20 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 21 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 21 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| 22 #include "chrome/browser/chromeos/dbus/power_manager_client.h" | 22 #include "chrome/browser/chromeos/dbus/power_manager_client.h" |
| 23 #include "chrome/browser/chromeos/dbus/session_manager_client.h" | 23 #include "chrome/browser/chromeos/dbus/session_manager_client.h" |
| 24 #include "chrome/browser/chromeos/disks/disk_mount_manager.h" | 24 #include "chrome/browser/chromeos/disks/disk_mount_manager.h" |
| 25 #include "chrome/browser/chromeos/external_metrics.h" | 25 #include "chrome/browser/chromeos/external_metrics.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_screen_locker.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/status/status_area_view_chromeos.h" | 38 #include "chrome/browser/chromeos/status/status_area_view_chromeos.h" |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 #endif | 353 #endif |
| 353 | 354 |
| 354 // Trigger prefetching of ownership status. | 355 // Trigger prefetching of ownership status. |
| 355 chromeos::OwnershipService::GetSharedInstance()->Prewarm(); | 356 chromeos::OwnershipService::GetSharedInstance()->Prewarm(); |
| 356 | 357 |
| 357 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 358 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
| 358 // -- just before CreateProfile(). | 359 // -- just before CreateProfile(). |
| 359 | 360 |
| 360 // Initialize the screen locker now so that it can receive | 361 // Initialize the screen locker now so that it can receive |
| 361 // LOGIN_USER_CHANGED notification from UserManager. | 362 // LOGIN_USER_CHANGED notification from UserManager. |
| 362 chromeos::ScreenLocker::InitClass(); | 363 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableKioskMode)) { |
| 364 chromeos::KioskModeScreenLocker::InitClass(); |
| 365 } else { |
| 366 chromeos::ScreenLocker::InitClass(); |
| 367 } |
| 363 | 368 |
| 364 // This forces the ProfileManager to be created and register for the | 369 // This forces the ProfileManager to be created and register for the |
| 365 // notification it needs to track the logged in user. | 370 // notification it needs to track the logged in user. |
| 366 g_browser_process->profile_manager(); | 371 g_browser_process->profile_manager(); |
| 367 | 372 |
| 368 // TODO(abarth): Should this move to InitializeNetworkOptions()? | 373 // TODO(abarth): Should this move to InitializeNetworkOptions()? |
| 369 // Allow access to file:// on ChromeOS for tests. | 374 // Allow access to file:// on ChromeOS for tests. |
| 370 if (parsed_command_line().HasSwitch(switches::kAllowFileAccess)) | 375 if (parsed_command_line().HasSwitch(switches::kAllowFileAccess)) |
| 371 net::URLRequest::AllowFileAccess(); | 376 net::URLRequest::AllowFileAccess(); |
| 372 | 377 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 | 511 |
| 507 // chromeos::SystemKeyEventListener::Shutdown() is always safe to call, | 512 // chromeos::SystemKeyEventListener::Shutdown() is always safe to call, |
| 508 // even if Initialize() wasn't called. | 513 // even if Initialize() wasn't called. |
| 509 chromeos::SystemKeyEventListener::Shutdown(); | 514 chromeos::SystemKeyEventListener::Shutdown(); |
| 510 chromeos::AudioHandler::Shutdown(); | 515 chromeos::AudioHandler::Shutdown(); |
| 511 | 516 |
| 512 chromeos::WebSocketProxyController::Shutdown(); | 517 chromeos::WebSocketProxyController::Shutdown(); |
| 513 | 518 |
| 514 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); | 519 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); |
| 515 } | 520 } |
| OLD | NEW |