Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Side by Side Diff: chrome/browser/chromeos/login/login_display_host_impl.cc

Issue 14269004: Add LoginState class to src/chromeos/login (redux) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/login_display_host_impl.h" 5 #include "chrome/browser/chromeos/login/login_display_host_impl.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 25 matching lines...) Expand all
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/lifetime/application_lifetime.h" 38 #include "chrome/browser/lifetime/application_lifetime.h"
39 #include "chrome/browser/managed_mode/managed_mode.h" 39 #include "chrome/browser/managed_mode/managed_mode.h"
40 #include "chrome/browser/policy/browser_policy_connector.h" 40 #include "chrome/browser/policy/browser_policy_connector.h"
41 #include "chrome/common/chrome_notification_types.h" 41 #include "chrome/common/chrome_notification_types.h"
42 #include "chrome/common/chrome_switches.h" 42 #include "chrome/common/chrome_switches.h"
43 #include "chrome/common/pref_names.h" 43 #include "chrome/common/pref_names.h"
44 #include "chromeos/dbus/dbus_thread_manager.h" 44 #include "chromeos/dbus/dbus_thread_manager.h"
45 #include "chromeos/dbus/session_manager_client.h" 45 #include "chromeos/dbus/session_manager_client.h"
46 #include "chromeos/login/login_state.h"
46 #include "content/public/browser/notification_service.h" 47 #include "content/public/browser/notification_service.h"
47 #include "content/public/browser/notification_types.h" 48 #include "content/public/browser/notification_types.h"
48 #include "googleurl/src/gurl.h" 49 #include "googleurl/src/gurl.h"
49 #include "ui/aura/window.h" 50 #include "ui/aura/window.h"
50 #include "ui/base/events/event_utils.h" 51 #include "ui/base/events/event_utils.h"
51 #include "ui/base/resource/resource_bundle.h" 52 #include "ui/base/resource/resource_bundle.h"
52 #include "ui/compositor/layer.h" 53 #include "ui/compositor/layer.h"
53 #include "ui/compositor/layer_animation_element.h" 54 #include "ui/compositor/layer_animation_element.h"
54 #include "ui/compositor/layer_animation_sequence.h" 55 #include "ui/compositor/layer_animation_sequence.h"
55 #include "ui/compositor/layer_animator.h" 56 #include "ui/compositor/layer_animator.h"
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 prefs->GetBoolean(prefs::kOwnerTapToClickEnabled)); 412 prefs->GetBoolean(prefs::kOwnerTapToClickEnabled));
412 } 413 }
413 414
414 ui::SetNaturalScroll(CommandLine::ForCurrentProcess()->HasSwitch( 415 ui::SetNaturalScroll(CommandLine::ForCurrentProcess()->HasSwitch(
415 switches::kNaturalScrollDefault)); 416 switches::kNaturalScrollDefault));
416 417
417 gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(size)); 418 gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(size));
418 419
419 // Check whether we need to execute OOBE process. 420 // Check whether we need to execute OOBE process.
420 bool oobe_complete = chromeos::WizardController::IsOobeCompleted(); 421 bool oobe_complete = chromeos::WizardController::IsOobeCompleted();
422 if (!oobe_complete) {
423 LoginState::Get()->SetLoggedInState(
424 LoginState::LOGGED_IN_OOBE, LoginState::LOGGED_IN_USER_NONE);
425 } else {
426 LoginState::Get()->SetLoggedInState(
427 LoginState::LOGGED_IN_NONE, LoginState::LOGGED_IN_USER_NONE);
428 }
421 bool show_login_screen = 429 bool show_login_screen =
422 (first_screen_name.empty() && oobe_complete) || 430 (first_screen_name.empty() && oobe_complete) ||
423 first_screen_name == chromeos::WizardController::kLoginScreenName; 431 first_screen_name == chromeos::WizardController::kLoginScreenName;
424 432
425 chromeos::LoginDisplayHost* display_host; 433 chromeos::LoginDisplayHost* display_host;
426 display_host = new chromeos::WebUILoginDisplayHost(screen_bounds); 434 display_host = new chromeos::WebUILoginDisplayHost(screen_bounds);
427 435
428 if (show_login_screen) { 436 if (show_login_screen) {
429 // R11 > R12 migration fix. See http://crosbug.com/p/4898. 437 // R11 > R12 migration fix. See http://crosbug.com/p/4898.
430 // If user has manually changed locale during R11 OOBE, locale will be set. 438 // 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
503 VLOG(1) << "Initial time zone: " << timezone_name; 511 VLOG(1) << "Initial time zone: " << timezone_name;
504 // Apply locale customizations only once to preserve whatever locale 512 // Apply locale customizations only once to preserve whatever locale
505 // user has changed to during OOBE. 513 // user has changed to during OOBE.
506 if (!timezone_name.empty()) { 514 if (!timezone_name.empty()) {
507 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( 515 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID(
508 UTF8ToUTF16(timezone_name)); 516 UTF8ToUTF16(timezone_name));
509 } 517 }
510 } 518 }
511 519
512 } // namespace chromeos 520 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.cc ('k') | chrome/browser/chromeos/login/login_utils_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698