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

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

Issue 209143002: Added shortcut for NW config screen in kiosk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/error_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/error_screen_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 &ErrorScreenHandler::HandleDiagnoseButtonClicked); 208 &ErrorScreenHandler::HandleDiagnoseButtonClicked);
209 AddCallback("configureCertsClicked", 209 AddCallback("configureCertsClicked",
210 &ErrorScreenHandler::HandleConfigureCerts); 210 &ErrorScreenHandler::HandleConfigureCerts);
211 } 211 }
212 212
213 void ErrorScreenHandler::DeclareLocalizedValues( 213 void ErrorScreenHandler::DeclareLocalizedValues(
214 LocalizedValuesBuilder* builder) { 214 LocalizedValuesBuilder* builder) {
215 builder->Add("loginErrorTitle", IDS_LOGIN_ERROR_TITLE); 215 builder->Add("loginErrorTitle", IDS_LOGIN_ERROR_TITLE);
216 builder->Add("signinOfflineMessageBody", IDS_LOGIN_OFFLINE_MESSAGE); 216 builder->Add("signinOfflineMessageBody", IDS_LOGIN_OFFLINE_MESSAGE);
217 builder->Add("kioskOfflineMessageBody", IDS_KIOSK_OFFLINE_MESSAGE); 217 builder->Add("kioskOfflineMessageBody", IDS_KIOSK_OFFLINE_MESSAGE);
218 builder->Add("kioskOnlineTitle", IDS_LOGIN_NETWORK_RESTORED_TITLE);
219 builder->Add("kioskOnlineMessageBody", IDS_KIOSK_ONLINE_MESSAGE);
218 builder->Add("autoEnrollmentOfflineMessageBody", 220 builder->Add("autoEnrollmentOfflineMessageBody",
219 IDS_LOGIN_AUTO_ENROLLMENT_OFFLINE_MESSAGE); 221 IDS_LOGIN_AUTO_ENROLLMENT_OFFLINE_MESSAGE);
220 builder->Add("captivePortalTitle", IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_TITLE); 222 builder->Add("captivePortalTitle", IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_TITLE);
221 builder->Add("captivePortalMessage", IDS_LOGIN_MAYBE_CAPTIVE_PORTAL); 223 builder->Add("captivePortalMessage", IDS_LOGIN_MAYBE_CAPTIVE_PORTAL);
222 builder->Add("captivePortalProxyMessage", 224 builder->Add("captivePortalProxyMessage",
223 IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_PROXY); 225 IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_PROXY);
224 builder->Add("captivePortalNetworkSelect", 226 builder->Add("captivePortalNetworkSelect",
225 IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_NETWORK_SELECT); 227 IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_NETWORK_SELECT);
226 builder->Add("signinProxyMessageText", IDS_LOGIN_PROXY_ERROR_MESSAGE); 228 builder->Add("signinProxyMessageText", IDS_LOGIN_PROXY_ERROR_MESSAGE);
227 builder->Add("updateOfflineMessageBody", IDS_UPDATE_OFFLINE_MESSAGE); 229 builder->Add("updateOfflineMessageBody", IDS_UPDATE_OFFLINE_MESSAGE);
228 builder->Add("updateProxyMessageText", IDS_UPDATE_PROXY_ERROR_MESSAGE); 230 builder->Add("updateProxyMessageText", IDS_UPDATE_PROXY_ERROR_MESSAGE);
229 builder->AddF("localStateErrorText0", IDS_LOCAL_STATE_ERROR_TEXT_0, 231 builder->AddF("localStateErrorText0", IDS_LOCAL_STATE_ERROR_TEXT_0,
230 IDS_SHORT_PRODUCT_NAME); 232 IDS_SHORT_PRODUCT_NAME);
231 builder->Add("localStateErrorText1", IDS_LOCAL_STATE_ERROR_TEXT_1); 233 builder->Add("localStateErrorText1", IDS_LOCAL_STATE_ERROR_TEXT_1);
232 builder->Add("localStateErrorPowerwashButton", 234 builder->Add("localStateErrorPowerwashButton",
233 IDS_LOCAL_STATE_ERROR_POWERWASH_BUTTON); 235 IDS_LOCAL_STATE_ERROR_POWERWASH_BUTTON);
234 builder->Add("connectingIndicatorText", IDS_LOGIN_CONNECTING_INDICATOR_TEXT); 236 builder->Add("connectingIndicatorText", IDS_LOGIN_CONNECTING_INDICATOR_TEXT);
235 builder->Add("rebootButton", IDS_RELAUNCH_BUTTON); 237 builder->Add("rebootButton", IDS_RELAUNCH_BUTTON);
236 builder->Add("diagnoseButton", IDS_DIAGNOSE_BUTTON); 238 builder->Add("diagnoseButton", IDS_DIAGNOSE_BUTTON);
237 builder->Add("configureCertsButton", IDS_MANAGE_CERTIFICATES); 239 builder->Add("configureCertsButton", IDS_MANAGE_CERTIFICATES);
240 builder->Add("continueButton", IDS_NETWORK_SELECTION_CONTINUE_BUTTON);
xiyuan 2014/03/25 05:21:19 nit: Suggest to use a different key so that if we
238 } 241 }
239 242
240 void ErrorScreenHandler::Initialize() { 243 void ErrorScreenHandler::Initialize() {
241 if (!page_is_ready()) 244 if (!page_is_ready())
242 return; 245 return;
243 if (show_on_init_) { 246 if (show_on_init_) {
244 base::DictionaryValue params; 247 base::DictionaryValue params;
245 params.SetInteger("uiState", static_cast<int>(ui_state_)); 248 params.SetInteger("uiState", static_cast<int>(ui_state_));
246 params.SetInteger("errorState", static_cast<int>(error_state_)); 249 params.SetInteger("errorState", static_cast<int>(error_state_));
247 params.SetString("network", network_); 250 params.SetString("network", network_);
248 params.SetBoolean("guestSigninAllowed", guest_signin_allowed_); 251 params.SetBoolean("guestSigninAllowed", guest_signin_allowed_);
249 params.SetBoolean("offlineLoginAllowed", offline_login_allowed_); 252 params.SetBoolean("offlineLoginAllowed", offline_login_allowed_);
250 params.SetBoolean("showConnectingIndicator", show_connecting_indicator_); 253 params.SetBoolean("showConnectingIndicator", show_connecting_indicator_);
251 Show(parent_screen_, &params); 254 Show(parent_screen_, &params);
252 show_on_init_ = false; 255 show_on_init_ = false;
253 } 256 }
254 } 257 }
255 258
256 } // namespace chromeos 259 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698