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

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

Issue 941973003: New OOBE implementation skeleton using WUG toolkit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: No explicit, gn format. Created 5 years, 9 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
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // Maximum delay for startup sound after 'loginPromptVisible' signal. 103 // Maximum delay for startup sound after 'loginPromptVisible' signal.
104 const int kStartupSoundMaxDelayMs = 2000; 104 const int kStartupSoundMaxDelayMs = 2000;
105 105
106 // URL which corresponds to the login WebUI. 106 // URL which corresponds to the login WebUI.
107 const char kLoginURL[] = "chrome://oobe/login"; 107 const char kLoginURL[] = "chrome://oobe/login";
108 108
109 // URL which corresponds to the OOBE WebUI. 109 // URL which corresponds to the OOBE WebUI.
110 const char kOobeURL[] = "chrome://oobe/oobe"; 110 const char kOobeURL[] = "chrome://oobe/oobe";
111 111
112 // URL which corresponds to the new implementation of OOBE WebUI. 112 // URL which corresponds to the new implementation of OOBE WebUI.
113 const char kNewOobeURL[] = "chrome://oobe/new-oobe"; 113 const char kNewOobeURL[] = "chrome://oobe-md/";
114 114
115 // URL which corresponds to the user adding WebUI. 115 // URL which corresponds to the user adding WebUI.
116 const char kUserAddingURL[] = "chrome://oobe/user-adding"; 116 const char kUserAddingURL[] = "chrome://oobe/user-adding";
117 117
118 // URL which corresponds to the app launch splash WebUI. 118 // URL which corresponds to the app launch splash WebUI.
119 const char kAppLaunchSplashURL[] = "chrome://oobe/app-launch-splash"; 119 const char kAppLaunchSplashURL[] = "chrome://oobe/app-launch-splash";
120 120
121 // Duration of sign-in transition animation. 121 // Duration of sign-in transition animation.
122 const int kLoginFadeoutTransitionDurationMs = 700; 122 const int kLoginFadeoutTransitionDurationMs = 700;
123 123
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 webui_login_display_(NULL), 266 webui_login_display_(NULL),
267 is_showing_login_(false), 267 is_showing_login_(false),
268 is_wallpaper_loaded_(false), 268 is_wallpaper_loaded_(false),
269 status_area_saved_visibility_(false), 269 status_area_saved_visibility_(false),
270 crash_count_(0), 270 crash_count_(0),
271 restore_path_(RESTORE_UNKNOWN), 271 restore_path_(RESTORE_UNKNOWN),
272 finalize_animation_type_(ANIMATION_WORKSPACE), 272 finalize_animation_type_(ANIMATION_WORKSPACE),
273 startup_sound_played_(false), 273 startup_sound_played_(false),
274 startup_sound_honors_spoken_feedback_(false), 274 startup_sound_honors_spoken_feedback_(false),
275 is_observing_keyboard_(false), 275 is_observing_keyboard_(false),
276 is_new_oobe_(false),
276 pointer_factory_(this), 277 pointer_factory_(this),
277 animation_weak_ptr_factory_(this) { 278 animation_weak_ptr_factory_(this) {
278 DBusThreadManager::Get()->GetSessionManagerClient()->AddObserver(this); 279 DBusThreadManager::Get()->GetSessionManagerClient()->AddObserver(this);
279 CrasAudioHandler::Get()->AddAudioObserver(this); 280 CrasAudioHandler::Get()->AddAudioObserver(this);
280 if (keyboard::KeyboardController::GetInstance()) { 281 if (keyboard::KeyboardController::GetInstance()) {
281 keyboard::KeyboardController::GetInstance()->AddObserver(this); 282 keyboard::KeyboardController::GetInstance()->AddObserver(this);
282 is_observing_keyboard_ = true; 283 is_observing_keyboard_ = true;
283 } 284 }
284 285
285 ash::Shell::GetInstance()->delegate()->AddVirtualKeyboardStateObserver(this); 286 ash::Shell::GetInstance()->delegate()->AddVirtualKeyboardStateObserver(this);
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 first_screen_name_ = first_screen_name; 492 first_screen_name_ = first_screen_name;
492 is_showing_login_ = false; 493 is_showing_login_ = false;
493 494
494 if (waiting_for_wallpaper_load_ && !initialize_webui_hidden_) { 495 if (waiting_for_wallpaper_load_ && !initialize_webui_hidden_) {
495 VLOG(1) << "Login WebUI >> wizard postponed"; 496 VLOG(1) << "Login WebUI >> wizard postponed";
496 return; 497 return;
497 } 498 }
498 VLOG(1) << "Login WebUI >> wizard"; 499 VLOG(1) << "Login WebUI >> wizard";
499 500
500 if (!login_window_) { 501 if (!login_window_) {
501 LoadURL(StartupUtils::IsNewOobeActivated() ? GURL(kNewOobeURL) 502 is_new_oobe_ = StartupUtils::IsNewOobeActivated();
502 : GURL(kOobeURL)); 503 LoadURL(is_new_oobe_ ? GURL(kNewOobeURL) : GURL(kOobeURL));
503 } 504 }
504 505
505 DVLOG(1) << "Starting wizard, first_screen_name: " << first_screen_name; 506 DVLOG(1) << "Starting wizard, first_screen_name: " << first_screen_name;
506 // Create and show the wizard. 507 // Create and show the wizard.
507 // Note, dtor of the old WizardController should be called before ctor of the 508 // Note, dtor of the old WizardController should be called before ctor of the
508 // new one, because "default_controller()" is updated there. So pure "reset()" 509 // new one, because "default_controller()" is updated there. So pure "reset()"
509 // is done before new controller creation. 510 // is done before new controller creation.
510 wizard_controller_.reset(); 511 wizard_controller_.reset();
511 wizard_controller_.reset(CreateWizardController()); 512 wizard_controller_.reset(CreateWizardController());
512 513
514 if (is_new_oobe_)
515 return;
516
513 oobe_progress_bar_visible_ = !StartupUtils::IsDeviceRegistered(); 517 oobe_progress_bar_visible_ = !StartupUtils::IsDeviceRegistered();
514 SetOobeProgressBarVisible(oobe_progress_bar_visible_); 518 SetOobeProgressBarVisible(oobe_progress_bar_visible_);
515 wizard_controller_->Init(first_screen_name); 519 wizard_controller_->Init(first_screen_name);
516 } 520 }
517 521
518 WizardController* LoginDisplayHostImpl::GetWizardController() { 522 WizardController* LoginDisplayHostImpl::GetWizardController() {
519 return wizard_controller_.get(); 523 return wizard_controller_.get();
520 } 524 }
521 525
522 AppLaunchController* LoginDisplayHostImpl::GetAppLaunchController() { 526 AppLaunchController* LoginDisplayHostImpl::GetAppLaunchController() {
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1270 1274
1271 locale_util::SwitchLanguageCallback callback( 1275 locale_util::SwitchLanguageCallback callback(
1272 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))); 1276 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())));
1273 1277
1274 // Load locale keyboards here. Hardware layout would be automatically enabled. 1278 // Load locale keyboards here. Hardware layout would be automatically enabled.
1275 locale_util::SwitchLanguage( 1279 locale_util::SwitchLanguage(
1276 locale, true, true /* login_layouts_only */, callback); 1280 locale, true, true /* login_layouts_only */, callback);
1277 } 1281 }
1278 1282
1279 } // namespace chromeos 1283 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/login_display_host_impl.h ('k') | chrome/browser/chromeos/oobe/oobe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698