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

Unified Diff: chrome/browser/chromeos/login/wizard_controller.cc

Issue 539273002: Added UI to enable debugging features on CrOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/wizard_controller.cc
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc
index 92c779015d571c79b989c5846301004f0917c5c9..0ce3c15e9a23702c6d7a8a138c7338ef00c481b4 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -34,6 +34,7 @@
#include "chrome/browser/chromeos/login/login_utils.h"
#include "chrome/browser/chromeos/login/screens/controller_pairing_screen.h"
#include "chrome/browser/chromeos/login/screens/device_disabled_screen.h"
+#include "chrome/browser/chromeos/login/screens/enable_debugging_screen.h"
#include "chrome/browser/chromeos/login/screens/error_screen.h"
#include "chrome/browser/chromeos/login/screens/eula_screen.h"
#include "chrome/browser/chromeos/login/screens/hid_detection_screen.h"
@@ -150,6 +151,7 @@ const char WizardController::kLoginScreenName[] = "login";
const char WizardController::kUpdateScreenName[] = "update";
const char WizardController::kUserImageScreenName[] = "image";
const char WizardController::kEulaScreenName[] = "eula";
+const char WizardController::kEnableDebuggingScreenName[] = "debugging";
const char WizardController::kEnrollmentScreenName[] = "enroll";
const char WizardController::kResetScreenName[] = "reset";
const char WizardController::kKioskEnableScreenName[] = "kiosk-enable";
@@ -311,6 +313,10 @@ BaseScreen* WizardController::CreateScreen(const std::string& screen_name) {
} else if (screen_name == kResetScreenName) {
return new chromeos::ResetScreen(this,
oobe_display_->GetResetScreenActor());
+ } else if (screen_name == kEnableDebuggingScreenName) {
+ return new chromeos::EnableDebuggingScreen(
+ this,
+ oobe_display_->GetEnableDebuggingScreenActor());
} else if (screen_name == kKioskEnableScreenName) {
return new chromeos::KioskEnableScreen(
this, oobe_display_->GetKioskEnableScreenActor());
@@ -468,6 +474,13 @@ void WizardController::ShowKioskAutolaunchScreen() {
SetCurrentScreen(GetScreen(kKioskAutolaunchScreenName));
}
+void WizardController::ShowEnableDebuggingScreen() {
+ VLOG(1) << "Showing enable developer features screen.";
+ SetStatusAreaVisible(false);
+ SetCurrentScreen(GetScreen(kEnableDebuggingScreenName));
+}
+
+
xiyuan 2014/10/30 03:52:08 nit: nuke one empty line.
zel 2014/10/31 01:22:26 Done.
void WizardController::ShowTermsOfServiceScreen() {
// Only show the Terms of Service when logging into a public account and Terms
// of Service have been specified through policy. In all other cases, advance
@@ -698,7 +711,7 @@ void WizardController::OnEnrollmentDone() {
ShowLoginScreen(LoginScreenContext());
}
-void WizardController::OnResetCanceled() {
+void WizardController::OnDeviceModificationCanceled() {
if (previous_screen_) {
SetCurrentScreen(previous_screen_);
} else {
@@ -888,6 +901,8 @@ void WizardController::AdvanceToScreen(const std::string& screen_name) {
ShowKioskEnableScreen();
} else if (screen_name == kKioskAutolaunchScreenName) {
ShowKioskAutolaunchScreen();
+ } else if (screen_name == kEnableDebuggingScreenName) {
+ ShowEnableDebuggingScreen();
} else if (screen_name == kEnrollmentScreenName) {
ShowEnrollmentScreen();
} else if (screen_name == kTermsOfServiceScreenName) {
@@ -967,6 +982,9 @@ void WizardController::OnExit(ExitCodes exit_code) {
case EULA_BACK:
ShowNetworkScreen();
break;
+ case ENABLE_DEBUGGING_CANCELED:
+ OnDeviceModificationCanceled();
+ break;
case ENTERPRISE_AUTO_ENROLLMENT_CHECK_COMPLETED:
if (skip_update_enroll_after_eula_)
ShowEnrollmentScreen();
@@ -980,7 +998,7 @@ void WizardController::OnExit(ExitCodes exit_code) {
ShowNetworkScreen();
break;
case RESET_CANCELED:
- OnResetCanceled();
+ OnDeviceModificationCanceled();
break;
case KIOSK_AUTOLAUNCH_CANCELED:
OnKioskAutolaunchCanceled();

Powered by Google App Engine
This is Rietveld 408576698