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

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

Issue 7015024: Converted from DOM to WebUI for new login method (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updating the patch after confirming with the most recent version of the code Created 9 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/dom_login_display.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/threading/thread_restrictions.h" 9 #include "base/threading/thread_restrictions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 20 matching lines...) Expand all
31 #include "googleurl/src/gurl.h" 31 #include "googleurl/src/gurl.h"
32 #include "third_party/cros/chromeos_wm_ipc_enums.h" 32 #include "third_party/cros/chromeos_wm_ipc_enums.h"
33 #include "ui/base/resource/resource_bundle.h" 33 #include "ui/base/resource/resource_bundle.h"
34 #include "unicode/timezone.h" 34 #include "unicode/timezone.h"
35 35
36 // TODO(altimofeev): move to ViewsLoginDisplayHost 36 // TODO(altimofeev): move to ViewsLoginDisplayHost
37 #include "chrome/browser/chromeos/login/views_oobe_display.h" 37 #include "chrome/browser/chromeos/login/views_oobe_display.h"
38 38
39 #if defined(TOUCH_UI) 39 #if defined(TOUCH_UI)
40 #include "base/command_line.h" 40 #include "base/command_line.h"
41 #include "chrome/browser/chromeos/login/dom_login_display_host.h" 41 #include "chrome/browser/chromeos/login/webui_login_display_host.h"
42 #endif 42 #endif
43 43
44 namespace { 44 namespace {
45 45
46 // The delay of triggering initialization of the device policy subsystem 46 // The delay of triggering initialization of the device policy subsystem
47 // after the login screen is initialized. This makes sure that device policy 47 // after the login screen is initialized. This makes sure that device policy
48 // network requests are made while the system is idle waiting for user input. 48 // network requests are made while the system is idle waiting for user input.
49 const int64 kPolicyServiceInitializationDelayMilliseconds = 100; 49 const int64 kPolicyServiceInitializationDelayMilliseconds = 100;
50 50
51 // Determines the hardware keyboard from the given locale code 51 // Determines the hardware keyboard from the given locale code
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 226
227 // Check whether we need to execute OOBE process. 227 // Check whether we need to execute OOBE process.
228 bool oobe_complete = chromeos::WizardController::IsOobeCompleted(); 228 bool oobe_complete = chromeos::WizardController::IsOobeCompleted();
229 bool show_login_screen = 229 bool show_login_screen =
230 (first_screen_name.empty() && oobe_complete) || 230 (first_screen_name.empty() && oobe_complete) ||
231 first_screen_name == chromeos::WizardController::kLoginScreenName; 231 first_screen_name == chromeos::WizardController::kLoginScreenName;
232 232
233 // TODO(nkostylev) Create LoginDisplayHost instance based on flag. 233 // TODO(nkostylev) Create LoginDisplayHost instance based on flag.
234 #if defined(TOUCH_UI) 234 #if defined(TOUCH_UI)
235 chromeos::LoginDisplayHost* display_host; 235 chromeos::LoginDisplayHost* display_host;
236 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDOMLogin)) { 236 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kWebUILogin)) {
237 display_host = new chromeos::DOMLoginDisplayHost(screen_bounds); 237 display_host = new chromeos::WebUILoginDisplayHost(screen_bounds);
238 } else { 238 } else {
239 display_host = new chromeos::ViewsLoginDisplayHost(screen_bounds); 239 display_host = new chromeos::ViewsLoginDisplayHost(screen_bounds);
240 } 240 }
241 #else 241 #else
242 chromeos::LoginDisplayHost* display_host = 242 chromeos::LoginDisplayHost* display_host =
243 new chromeos::ViewsLoginDisplayHost(screen_bounds); 243 new chromeos::ViewsLoginDisplayHost(screen_bounds);
244 #endif 244 #endif
245 if (show_login_screen && chromeos::CrosLibrary::Get()->EnsureLoaded()) { 245 if (show_login_screen && chromeos::CrosLibrary::Get()->EnsureLoaded()) {
246 display_host->StartSignInScreen(); 246 display_host->StartSignInScreen();
247 return; 247 return;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 if (!timezone_name.empty()) { 310 if (!timezone_name.empty()) {
311 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( 311 icu::TimeZone* timezone = icu::TimeZone::createTimeZone(
312 icu::UnicodeString::fromUTF8(timezone_name)); 312 icu::UnicodeString::fromUTF8(timezone_name));
313 CHECK(timezone) << "Timezone could not be set for " << timezone_name; 313 CHECK(timezone) << "Timezone could not be set for " << timezone_name;
314 chromeos::SystemAccess::GetInstance()->SetTimezone(*timezone); 314 chromeos::SystemAccess::GetInstance()->SetTimezone(*timezone);
315 } 315 }
316 } 316 }
317 } 317 }
318 318
319 } // namespace browser 319 } // namespace browser
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/dom_login_display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698