OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/webui/chromeos/login/app_launch_splash_screen_handle
r.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handle
r.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 7 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
8 #include "chrome/browser/chromeos/login/screens/network_error.h" | 8 #include "chrome/browser/chromeos/login/screens/network_error.h" |
9 #include "chrome/browser/ui/webui/chromeos/login/oobe_screen.h" | 9 #include "chrome/browser/ui/webui/chromeos/login/oobe_screen.h" |
10 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 10 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 NetworkError::ERROR_STATE_KIOSK_ONLINE, network_name); | 177 NetworkError::ERROR_STATE_KIOSK_ONLINE, network_name); |
178 break; | 178 break; |
179 } | 179 } |
180 default: | 180 default: |
181 network_error_model_->SetErrorState(NetworkError::ERROR_STATE_OFFLINE, | 181 network_error_model_->SetErrorState(NetworkError::ERROR_STATE_OFFLINE, |
182 network_name); | 182 network_name); |
183 NOTREACHED(); | 183 NOTREACHED(); |
184 break; | 184 break; |
185 } | 185 } |
186 | 186 |
187 OobeScreen screen = OobeScreen::SCREEN_UNKNOWN; | 187 if (GetCurrentScreen() != OobeScreen::SCREEN_ERROR_MESSAGE) |
188 OobeUI* oobe_ui = static_cast<OobeUI*>(web_ui()->GetController()); | |
189 if (oobe_ui) | |
190 screen = oobe_ui->current_screen(); | |
191 | |
192 if (screen != OobeScreen::SCREEN_ERROR_MESSAGE) | |
193 network_error_model_->SetParentScreen(OobeScreen::SCREEN_APP_LAUNCH_SPLASH); | 188 network_error_model_->SetParentScreen(OobeScreen::SCREEN_APP_LAUNCH_SPLASH); |
194 network_error_model_->Show(); | 189 network_error_model_->Show(); |
195 } | 190 } |
196 | 191 |
197 bool AppLaunchSplashScreenHandler::IsNetworkReady() { | 192 bool AppLaunchSplashScreenHandler::IsNetworkReady() { |
198 return network_state_informer_->state() == NetworkStateInformer::ONLINE; | 193 return network_state_informer_->state() == NetworkStateInformer::ONLINE; |
199 } | 194 } |
200 | 195 |
201 void AppLaunchSplashScreenHandler::OnNetworkReady() { | 196 void AppLaunchSplashScreenHandler::OnNetworkReady() { |
202 // Purposely leave blank because the online case is handled in UpdateState | 197 // Purposely leave blank because the online case is handled in UpdateState |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 DCHECK(online_state_); | 281 DCHECK(online_state_); |
287 if (delegate_ && online_state_) { | 282 if (delegate_ && online_state_) { |
288 network_config_requested_ = false; | 283 network_config_requested_ = false; |
289 network_config_done_ = true; | 284 network_config_done_ = true; |
290 delegate_->OnNetworkConfigRequested(false); | 285 delegate_->OnNetworkConfigRequested(false); |
291 Show(app_id_); | 286 Show(app_id_); |
292 } | 287 } |
293 } | 288 } |
294 | 289 |
295 } // namespace chromeos | 290 } // namespace chromeos |
OLD | NEW |