OLD | NEW |
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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 base::Unretained(this))); | 342 base::Unretained(this))); |
343 web_ui()->RegisterMessageCallback("showCaptivePortal", | 343 web_ui()->RegisterMessageCallback("showCaptivePortal", |
344 base::Bind(&ErrorScreenHandler::HandleShowCaptivePortal, | 344 base::Bind(&ErrorScreenHandler::HandleShowCaptivePortal, |
345 base::Unretained(this))); | 345 base::Unretained(this))); |
346 web_ui()->RegisterMessageCallback("hideCaptivePortal", | 346 web_ui()->RegisterMessageCallback("hideCaptivePortal", |
347 base::Bind(&ErrorScreenHandler::HandleHideCaptivePortal, | 347 base::Bind(&ErrorScreenHandler::HandleHideCaptivePortal, |
348 base::Unretained(this))); | 348 base::Unretained(this))); |
349 web_ui()->RegisterMessageCallback("errorScreenUpdate", | 349 web_ui()->RegisterMessageCallback("errorScreenUpdate", |
350 base::Bind(&ErrorScreenHandler::HandleErrorScreenUpdate, | 350 base::Bind(&ErrorScreenHandler::HandleErrorScreenUpdate, |
351 base::Unretained(this))); | 351 base::Unretained(this))); |
| 352 web_ui()->RegisterMessageCallback("updateGaiaIsLocal", |
| 353 base::Bind(&ErrorScreenHandler::HandleUpdateGaiaIsLocal, |
| 354 base::Unretained(this))); |
352 } | 355 } |
353 | 356 |
354 void ErrorScreenHandler::GetLocalizedStrings( | 357 void ErrorScreenHandler::GetLocalizedStrings( |
355 base::DictionaryValue* localized_strings) { | 358 base::DictionaryValue* localized_strings) { |
356 localized_strings->SetString("offlineMessageTitle", | 359 localized_strings->SetString("offlineMessageTitle", |
357 l10n_util::GetStringUTF16(IDS_LOGIN_OFFLINE_TITLE)); | 360 l10n_util::GetStringUTF16(IDS_LOGIN_OFFLINE_TITLE)); |
358 localized_strings->SetString("offlineMessageBody", | 361 localized_strings->SetString("offlineMessageBody", |
359 l10n_util::GetStringUTF16(IDS_LOGIN_OFFLINE_MESSAGE)); | 362 l10n_util::GetStringUTF16(IDS_LOGIN_OFFLINE_MESSAGE)); |
360 localized_strings->SetString("captivePortalTitle", | 363 localized_strings->SetString("captivePortalTitle", |
361 l10n_util::GetStringUTF16(IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_TITLE)); | 364 l10n_util::GetStringUTF16(IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_TITLE)); |
(...skipping 10 matching lines...) Expand all Loading... |
372 void ErrorScreenHandler::Initialize() { | 375 void ErrorScreenHandler::Initialize() { |
373 } | 376 } |
374 | 377 |
375 gfx::NativeWindow ErrorScreenHandler::GetNativeWindow() { | 378 gfx::NativeWindow ErrorScreenHandler::GetNativeWindow() { |
376 if (native_window_delegate_) | 379 if (native_window_delegate_) |
377 return native_window_delegate_->GetNativeWindow(); | 380 return native_window_delegate_->GetNativeWindow(); |
378 return NULL; | 381 return NULL; |
379 } | 382 } |
380 | 383 |
381 } // namespace chromeos | 384 } // namespace chromeos |
OLD | NEW |