| 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/mobile_setup_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/mobile_setup_ui.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 l10n_util::GetStringUTF16(IDS_MOBILE_INVALID_DEVICE_INFO_HEADER)); | 331 l10n_util::GetStringUTF16(IDS_MOBILE_INVALID_DEVICE_INFO_HEADER)); |
| 332 strings.SetString("title", l10n_util::GetStringUTF16(IDS_MOBILE_SETUP_TITLE)); | 332 strings.SetString("title", l10n_util::GetStringUTF16(IDS_MOBILE_SETUP_TITLE)); |
| 333 strings.SetString("close_button", | 333 strings.SetString("close_button", |
| 334 l10n_util::GetStringUTF16(IDS_CLOSE)); | 334 l10n_util::GetStringUTF16(IDS_CLOSE)); |
| 335 strings.SetString("cancel_button", | 335 strings.SetString("cancel_button", |
| 336 l10n_util::GetStringUTF16(IDS_CANCEL)); | 336 l10n_util::GetStringUTF16(IDS_CANCEL)); |
| 337 strings.SetString("ok_button", | 337 strings.SetString("ok_button", |
| 338 l10n_util::GetStringUTF16(IDS_OK)); | 338 l10n_util::GetStringUTF16(IDS_OK)); |
| 339 webui::SetFontAndTextDirection(&strings); | 339 webui::SetFontAndTextDirection(&strings); |
| 340 | 340 |
| 341 webui::UseVersion2 version_2; | |
| 342 | |
| 343 // The webui differs based on whether the network is activated or not. If the | 341 // The webui differs based on whether the network is activated or not. If the |
| 344 // network is activated, the webui goes straight to portal. Otherwise the | 342 // network is activated, the webui goes straight to portal. Otherwise the |
| 345 // webui is used for activation flow. | 343 // webui is used for activation flow. |
| 346 std::string full_html; | 344 std::string full_html; |
| 347 if (activation_state == shill::kActivationStateActivated) { | 345 if (activation_state == shill::kActivationStateActivated) { |
| 348 static const base::StringPiece html_for_activated( | 346 static const base::StringPiece html_for_activated( |
| 349 ResourceBundle::GetSharedInstance().GetRawDataResource( | 347 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 350 IDR_MOBILE_SETUP_PORTAL_PAGE_HTML)); | 348 IDR_MOBILE_SETUP_PORTAL_PAGE_HTML)); |
| 351 full_html = webui::GetI18nTemplateHtml(html_for_activated, &strings); | 349 full_html = webui::GetI18nTemplateHtml(html_for_activated, &strings); |
| 352 } else { | 350 } else { |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 const GURL& validated_url, | 650 const GURL& validated_url, |
| 653 int error_code, | 651 int error_code, |
| 654 const base::string16& error_description) { | 652 const base::string16& error_description) { |
| 655 if (render_frame_host->GetFrameName() != "paymentForm") | 653 if (render_frame_host->GetFrameName() != "paymentForm") |
| 656 return; | 654 return; |
| 657 | 655 |
| 658 base::FundamentalValue result_value(-error_code); | 656 base::FundamentalValue result_value(-error_code); |
| 659 web_ui()->CallJavascriptFunction(kJsPortalFrameLoadFailedCallback, | 657 web_ui()->CallJavascriptFunction(kJsPortalFrameLoadFailedCallback, |
| 660 result_value); | 658 result_value); |
| 661 } | 659 } |
| OLD | NEW |