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

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

Issue 2429033003: cros: Cleanup lock screen and OOBE C++ backing code. (Closed)
Patch Set: Address comments Created 4 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/shutdown_policy_browsertest.cc ('k') | chrome/browser/ui/webui/chromeos/login/base_screen_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698