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/login/base_login_display_host.h" | 5 #include "chrome/browser/chromeos/login/base_login_display_host.h" |
6 | 6 |
7 #include "ash/desktop_background/desktop_background_controller.h" | 7 #include "ash/desktop_background/desktop_background_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "chrome/browser/chromeos/policy/auto_enrollment_client.h" | 35 #include "chrome/browser/chromeos/policy/auto_enrollment_client.h" |
36 #include "chrome/browser/chromeos/system/input_device_settings.h" | 36 #include "chrome/browser/chromeos/system/input_device_settings.h" |
37 #include "chrome/browser/chromeos/system/timezone_settings.h" | 37 #include "chrome/browser/chromeos/system/timezone_settings.h" |
38 #include "chrome/browser/managed_mode/managed_mode.h" | 38 #include "chrome/browser/managed_mode/managed_mode.h" |
39 #include "chrome/browser/policy/browser_policy_connector.h" | 39 #include "chrome/browser/policy/browser_policy_connector.h" |
40 #include "chrome/common/chrome_notification_types.h" | 40 #include "chrome/common/chrome_notification_types.h" |
41 #include "chrome/common/chrome_switches.h" | 41 #include "chrome/common/chrome_switches.h" |
42 #include "chrome/common/pref_names.h" | 42 #include "chrome/common/pref_names.h" |
43 #include "chromeos/dbus/dbus_thread_manager.h" | 43 #include "chromeos/dbus/dbus_thread_manager.h" |
44 #include "chromeos/dbus/session_manager_client.h" | 44 #include "chromeos/dbus/session_manager_client.h" |
| 45 #include "chromeos/login/login_state.h" |
45 #include "content/public/browser/notification_service.h" | 46 #include "content/public/browser/notification_service.h" |
46 #include "content/public/browser/notification_types.h" | 47 #include "content/public/browser/notification_types.h" |
47 #include "googleurl/src/gurl.h" | 48 #include "googleurl/src/gurl.h" |
48 #include "ui/aura/window.h" | 49 #include "ui/aura/window.h" |
49 #include "ui/base/events/event_utils.h" | 50 #include "ui/base/events/event_utils.h" |
50 #include "ui/base/resource/resource_bundle.h" | 51 #include "ui/base/resource/resource_bundle.h" |
51 #include "ui/compositor/layer.h" | 52 #include "ui/compositor/layer.h" |
52 #include "ui/compositor/layer_animation_element.h" | 53 #include "ui/compositor/layer_animation_element.h" |
53 #include "ui/compositor/layer_animation_sequence.h" | 54 #include "ui/compositor/layer_animation_sequence.h" |
54 #include "ui/compositor/layer_animator.h" | 55 #include "ui/compositor/layer_animator.h" |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 prefs->GetBoolean(prefs::kOwnerTapToClickEnabled)); | 417 prefs->GetBoolean(prefs::kOwnerTapToClickEnabled)); |
417 } | 418 } |
418 | 419 |
419 ui::SetNaturalScroll(CommandLine::ForCurrentProcess()->HasSwitch( | 420 ui::SetNaturalScroll(CommandLine::ForCurrentProcess()->HasSwitch( |
420 switches::kNaturalScrollDefault)); | 421 switches::kNaturalScrollDefault)); |
421 | 422 |
422 gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(size)); | 423 gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(size)); |
423 | 424 |
424 // Check whether we need to execute OOBE process. | 425 // Check whether we need to execute OOBE process. |
425 bool oobe_complete = chromeos::WizardController::IsOobeCompleted(); | 426 bool oobe_complete = chromeos::WizardController::IsOobeCompleted(); |
| 427 if (!oobe_complete) { |
| 428 LoginState::Get()->SetLoggedInState( |
| 429 LoginState::LOGGED_IN_OOBE, LoginState::LOGGED_IN_USER_NONE); |
| 430 } else { |
| 431 LoginState::Get()->SetLoggedInState( |
| 432 LoginState::LOGGED_IN_NONE, LoginState::LOGGED_IN_USER_NONE); |
| 433 } |
426 bool show_login_screen = | 434 bool show_login_screen = |
427 (first_screen_name.empty() && oobe_complete) || | 435 (first_screen_name.empty() && oobe_complete) || |
428 first_screen_name == chromeos::WizardController::kLoginScreenName; | 436 first_screen_name == chromeos::WizardController::kLoginScreenName; |
429 | 437 |
430 chromeos::LoginDisplayHost* display_host; | 438 chromeos::LoginDisplayHost* display_host; |
431 display_host = new chromeos::WebUILoginDisplayHost(screen_bounds); | 439 display_host = new chromeos::WebUILoginDisplayHost(screen_bounds); |
432 | 440 |
433 if (show_login_screen) { | 441 if (show_login_screen) { |
434 // R11 > R12 migration fix. See http://crosbug.com/p/4898. | 442 // R11 > R12 migration fix. See http://crosbug.com/p/4898. |
435 // If user has manually changed locale during R11 OOBE, locale will be set. | 443 // If user has manually changed locale during R11 OOBE, locale will be set. |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 VLOG(1) << "Initial time zone: " << timezone_name; | 516 VLOG(1) << "Initial time zone: " << timezone_name; |
509 // Apply locale customizations only once to preserve whatever locale | 517 // Apply locale customizations only once to preserve whatever locale |
510 // user has changed to during OOBE. | 518 // user has changed to during OOBE. |
511 if (!timezone_name.empty()) { | 519 if (!timezone_name.empty()) { |
512 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( | 520 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( |
513 UTF8ToUTF16(timezone_name)); | 521 UTF8ToUTF16(timezone_name)); |
514 } | 522 } |
515 } | 523 } |
516 | 524 |
517 } // namespace chromeos | 525 } // namespace chromeos |
OLD | NEW |