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

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

Issue 209143002: Added shortcut for NW config screen in kiosk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/app_launch_controller.cc
diff --git a/chrome/browser/chromeos/login/app_launch_controller.cc b/chrome/browser/chromeos/login/app_launch_controller.cc
index 7cda1fc3eb69eeecce5dbb5f1491bc5b6c0ace95..ce30f7652222912b60f0855066c2046f45b5fd27 100644
--- a/chrome/browser/chromeos/login/app_launch_controller.cc
+++ b/chrome/browser/chromeos/login/app_launch_controller.cc
@@ -119,6 +119,7 @@ AppLaunchController::AppLaunchController(const std::string& app_id,
waiting_for_network_(false),
network_wait_timedout_(false),
showing_network_dialog_(false),
+ network_config_requested_(false),
launch_splash_start_time_(0) {
}
@@ -216,11 +217,19 @@ void AppLaunchController::OnCancelAppLaunch() {
OnLaunchFailed(KioskAppLaunchError::USER_CANCEL);
}
+void AppLaunchController::OnNetworkConfigRequested(bool requested) {
+ network_config_requested_ = requested;
+ if (requested)
+ MaybeShowNetworkConfigureUI();
+ else
+ startup_app_launcher_->RestartLauncher();
+}
+
void AppLaunchController::OnNetworkStateChanged(bool online) {
if (!waiting_for_network_)
return;
- if (online)
+ if (online && !network_config_requested_)
startup_app_launcher_->ContinueWithNetworkReady();
else if (network_wait_timedout_)
MaybeShowNetworkConfigureUI();
@@ -300,7 +309,10 @@ bool AppLaunchController::NeedOwnerAuthToConfigureNetwork() {
void AppLaunchController::MaybeShowNetworkConfigureUI() {
if (CanConfigureNetwork()) {
if (NeedOwnerAuthToConfigureNetwork()) {
- app_launch_splash_screen_actor_->ToggleNetworkConfig(true);
+ if (network_config_requested_)
+ OnConfigureNetwork();
+ else
+ app_launch_splash_screen_actor_->ToggleNetworkConfig(true);
} else {
showing_network_dialog_ = true;
app_launch_splash_screen_actor_->ShowNetworkConfigureUI();
@@ -312,7 +324,7 @@ void AppLaunchController::MaybeShowNetworkConfigureUI() {
}
void AppLaunchController::InitializeNetwork() {
- // Show the network configration dialog if network is not initialized
+ // Show the network configuration dialog if network is not initialized
// after a brief wait time.
waiting_for_network_ = true;
network_wait_timer_.Start(
@@ -357,6 +369,10 @@ void AppLaunchController::OnInstallingApp() {
void AppLaunchController::OnReadyToLaunch() {
launcher_ready_ = true;
+
+ if (network_config_requested_)
+ return;
+
if (!webui_visible_)
return;
@@ -402,4 +418,8 @@ void AppLaunchController::OnLaunchFailed(KioskAppLaunchError::Error error) {
CleanUp();
}
+bool AppLaunchController::IsShowingNetworkConfigScreen() {
+ return network_config_requested_;
+}
+
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/login/app_launch_controller.h ('k') | chrome/browser/chromeos/login/kiosk_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698