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

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

Issue 608283003: Remove retail mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/debug/trace_event.h" 11 #include "base/debug/trace_event.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/prefs/pref_service.h" 13 #include "base/prefs/pref_service.h"
14 #include "base/strings/string_split.h" 14 #include "base/strings/string_split.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "base/threading/thread_restrictions.h" 16 #include "base/threading/thread_restrictions.h"
17 #include "base/time/time.h" 17 #include "base/time/time.h"
18 #include "chrome/browser/browser_process.h" 18 #include "chrome/browser/browser_process.h"
19 #include "chrome/browser/browser_shutdown.h" 19 #include "chrome/browser/browser_shutdown.h"
20 #include "chrome/browser/chrome_notification_types.h" 20 #include "chrome/browser/chrome_notification_types.h"
21 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 21 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
22 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" 22 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
23 #include "chrome/browser/chromeos/base/locale_util.h" 23 #include "chrome/browser/chromeos/base/locale_util.h"
24 #include "chrome/browser/chromeos/boot_times_loader.h" 24 #include "chrome/browser/chromeos/boot_times_loader.h"
25 #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h" 25 #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h"
26 #include "chrome/browser/chromeos/first_run/first_run.h" 26 #include "chrome/browser/chromeos/first_run/first_run.h"
27 #include "chrome/browser/chromeos/input_method/input_method_util.h" 27 #include "chrome/browser/chromeos/input_method/input_method_util.h"
28 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
29 #include "chrome/browser/chromeos/language_preferences.h" 28 #include "chrome/browser/chromeos/language_preferences.h"
30 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" 29 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h"
31 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h" 30 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h"
32 #include "chrome/browser/chromeos/login/existing_user_controller.h" 31 #include "chrome/browser/chromeos/login/existing_user_controller.h"
33 #include "chrome/browser/chromeos/login/helper.h" 32 #include "chrome/browser/chromeos/login/helper.h"
34 #include "chrome/browser/chromeos/login/login_utils.h" 33 #include "chrome/browser/chromeos/login/login_utils.h"
35 #include "chrome/browser/chromeos/login/login_wizard.h" 34 #include "chrome/browser/chromeos/login/login_wizard.h"
36 #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h" 35 #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h"
37 #include "chrome/browser/chromeos/login/startup_utils.h" 36 #include "chrome/browser/chromeos/login/startup_utils.h"
38 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h" 37 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 initialize_webui_hidden_ = true; 354 initialize_webui_hidden_ = true;
356 else if (override_type == kWebUIInitPostpone) 355 else if (override_type == kWebUIInitPostpone)
357 initialize_webui_hidden_ = false; 356 initialize_webui_hidden_ = false;
358 } 357 }
359 358
360 // Always postpone WebUI initialization on first boot, otherwise we miss 359 // Always postpone WebUI initialization on first boot, otherwise we miss
361 // initial animation. 360 // initial animation.
362 if (!StartupUtils::IsOobeCompleted()) 361 if (!StartupUtils::IsOobeCompleted())
363 initialize_webui_hidden_ = false; 362 initialize_webui_hidden_ = false;
364 363
365 // There is no wallpaper for KioskMode, don't initialize the webui hidden.
366 if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled())
367 initialize_webui_hidden_ = false;
368
369 #if !defined(USE_ATHENA) 364 #if !defined(USE_ATHENA)
370 if (waiting_for_wallpaper_load_) { 365 if (waiting_for_wallpaper_load_) {
371 registrar_.Add(this, 366 registrar_.Add(this,
372 chrome::NOTIFICATION_WALLPAPER_ANIMATION_FINISHED, 367 chrome::NOTIFICATION_WALLPAPER_ANIMATION_FINISHED,
373 content::NotificationService::AllSources()); 368 content::NotificationService::AllSources());
374 } 369 }
375 #endif 370 #endif
376 371
377 // When we wait for WebUI to be initialized we wait for one of 372 // When we wait for WebUI to be initialized we wait for one of
378 // these notifications. 373 // these notifications.
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 // Initiate device policy fetching. 655 // Initiate device policy fetching.
661 policy::BrowserPolicyConnectorChromeOS* connector = 656 policy::BrowserPolicyConnectorChromeOS* connector =
662 g_browser_process->platform_part()->browser_policy_connector_chromeos(); 657 g_browser_process->platform_part()->browser_policy_connector_chromeos();
663 connector->ScheduleServiceInitialization( 658 connector->ScheduleServiceInitialization(
664 kPolicyServiceInitializationDelayMilliseconds); 659 kPolicyServiceInitializationDelayMilliseconds);
665 660
666 CHECK(webui_login_display_); 661 CHECK(webui_login_display_);
667 GetOobeUI()->ShowSigninScreen(context, 662 GetOobeUI()->ShowSigninScreen(context,
668 webui_login_display_, 663 webui_login_display_,
669 webui_login_display_); 664 webui_login_display_);
670 if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled())
671 SetStatusAreaVisible(false);
672 TRACE_EVENT_ASYNC_STEP_INTO0("ui", 665 TRACE_EVENT_ASYNC_STEP_INTO0("ui",
673 "ShowLoginWebUI", 666 "ShowLoginWebUI",
674 kShowLoginWebUIid, 667 kShowLoginWebUIid,
675 "WaitForScreenStateInitialize"); 668 "WaitForScreenStateInitialize");
676 BootTimesLoader::Get()->RecordCurrentStats( 669 BootTimesLoader::Get()->RecordCurrentStats(
677 "login-wait-for-signin-state-initialize"); 670 "login-wait-for-signin-state-initialize");
678 } 671 }
679 672
680 void LoginDisplayHostImpl::OnPreferencesChanged() { 673 void LoginDisplayHostImpl::OnPreferencesChanged() {
681 if (is_showing_login_) 674 if (is_showing_login_)
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 1270
1278 locale_util::SwitchLanguageCallback callback( 1271 locale_util::SwitchLanguageCallback callback(
1279 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))); 1272 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())));
1280 1273
1281 // Load locale keyboards here. Hardware layout would be automatically enabled. 1274 // Load locale keyboards here. Hardware layout would be automatically enabled.
1282 locale_util::SwitchLanguage( 1275 locale_util::SwitchLanguage(
1283 locale, true, true /* login_layouts_only */, callback); 1276 locale, true, true /* login_layouts_only */, callback);
1284 } 1277 }
1285 1278
1286 } // namespace chromeos 1279 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698