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

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

Issue 363613004: [cros] Define session_manager component with SessionManager base class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ui/login_display_host_impl.h" 5 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/audio/sounds.h" 9 #include "ash/audio/sounds.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #include "chrome/common/pref_names.h" 61 #include "chrome/common/pref_names.h"
62 #include "chromeos/audio/chromeos_sounds.h" 62 #include "chromeos/audio/chromeos_sounds.h"
63 #include "chromeos/chromeos_constants.h" 63 #include "chromeos/chromeos_constants.h"
64 #include "chromeos/chromeos_switches.h" 64 #include "chromeos/chromeos_switches.h"
65 #include "chromeos/dbus/dbus_thread_manager.h" 65 #include "chromeos/dbus/dbus_thread_manager.h"
66 #include "chromeos/dbus/session_manager_client.h" 66 #include "chromeos/dbus/session_manager_client.h"
67 #include "chromeos/ime/extension_ime_util.h" 67 #include "chromeos/ime/extension_ime_util.h"
68 #include "chromeos/ime/input_method_manager.h" 68 #include "chromeos/ime/input_method_manager.h"
69 #include "chromeos/login/login_state.h" 69 #include "chromeos/login/login_state.h"
70 #include "chromeos/settings/timezone_settings.h" 70 #include "chromeos/settings/timezone_settings.h"
71 #include "components/session_manager/core/session_manager.h"
71 #include "content/public/browser/notification_service.h" 72 #include "content/public/browser/notification_service.h"
72 #include "content/public/browser/notification_types.h" 73 #include "content/public/browser/notification_types.h"
73 #include "content/public/browser/render_frame_host.h" 74 #include "content/public/browser/render_frame_host.h"
74 #include "content/public/browser/web_contents.h" 75 #include "content/public/browser/web_contents.h"
75 #include "content/public/browser/web_ui.h" 76 #include "content/public/browser/web_ui.h"
76 #include "grit/browser_resources.h" 77 #include "grit/browser_resources.h"
77 #include "media/audio/sounds/sounds_manager.h" 78 #include "media/audio/sounds/sounds_manager.h"
78 #include "ui/aura/window.h" 79 #include "ui/aura/window.h"
79 #include "ui/base/resource/resource_bundle.h" 80 #include "ui/base/resource/resource_bundle.h"
80 #include "ui/base/ui_base_switches_util.h" 81 #include "ui/base/ui_base_switches_util.h"
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 } 1179 }
1179 system::InputDeviceSettings::Get()->SetNaturalScroll( 1180 system::InputDeviceSettings::Get()->SetNaturalScroll(
1180 CommandLine::ForCurrentProcess()->HasSwitch( 1181 CommandLine::ForCurrentProcess()->HasSwitch(
1181 switches::kNaturalScrollDefault)); 1182 switches::kNaturalScrollDefault));
1182 1183
1183 gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(gfx::Size())); 1184 gfx::Rect screen_bounds(chromeos::CalculateScreenBounds(gfx::Size()));
1184 1185
1185 // Check whether we need to execute OOBE process. 1186 // Check whether we need to execute OOBE process.
1186 bool oobe_complete = chromeos::StartupUtils::IsOobeCompleted(); 1187 bool oobe_complete = chromeos::StartupUtils::IsOobeCompleted();
1187 if (!oobe_complete) { 1188 if (!oobe_complete) {
1189 g_browser_process->platform_part()->session_manager()->SetSessionState(
1190 session_manager::SessionManager::SESSION_STATE_OOBE);
1188 LoginState::Get()->SetLoggedInState( 1191 LoginState::Get()->SetLoggedInState(
1189 LoginState::LOGGED_IN_OOBE, LoginState::LOGGED_IN_USER_NONE); 1192 LoginState::LOGGED_IN_OOBE, LoginState::LOGGED_IN_USER_NONE);
1190 } else { 1193 } else {
1194 g_browser_process->platform_part()->session_manager()->SetSessionState(
1195 session_manager::SessionManager::SESSION_STATE_LOGIN_PRIMARY);
1191 LoginState::Get()->SetLoggedInState( 1196 LoginState::Get()->SetLoggedInState(
1192 LoginState::LOGGED_IN_NONE, LoginState::LOGGED_IN_USER_NONE); 1197 LoginState::LOGGED_IN_NONE, LoginState::LOGGED_IN_USER_NONE);
1193 } 1198 }
1194 1199
1195 LoginDisplayHost* display_host = new LoginDisplayHostImpl(screen_bounds); 1200 LoginDisplayHost* display_host = new LoginDisplayHostImpl(screen_bounds);
1196 1201
1197 bool show_app_launch_splash_screen = (first_screen_name == 1202 bool show_app_launch_splash_screen = (first_screen_name ==
1198 chromeos::WizardController::kAppLaunchSplashScreenName); 1203 chromeos::WizardController::kAppLaunchSplashScreenName);
1199 if (show_app_launch_splash_screen) { 1204 if (show_app_launch_splash_screen) {
1200 const std::string& auto_launch_app_id = 1205 const std::string& auto_launch_app_id =
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 scoped_ptr<locale_util::SwitchLanguageCallback> callback( 1280 scoped_ptr<locale_util::SwitchLanguageCallback> callback(
1276 new locale_util::SwitchLanguageCallback( 1281 new locale_util::SwitchLanguageCallback(
1277 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); 1282 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))));
1278 1283
1279 // Load locale keyboards here. Hardware layout would be automatically enabled. 1284 // Load locale keyboards here. Hardware layout would be automatically enabled.
1280 locale_util::SwitchLanguage( 1285 locale_util::SwitchLanguage(
1281 locale, true, true /* login_layouts_only */, callback.Pass()); 1286 locale, true, true /* login_layouts_only */, callback.Pass());
1282 } 1287 }
1283 1288
1284 } // namespace chromeos 1289 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698