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

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

Issue 830743003: Directly inline shared WebUI CSS declarations into the security and supervised user interstitials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: review Created 5 years, 11 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 (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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 l10n_util::GetStringUTF16(IDS_MOBILE_NO_CONNECTION_HEADER)); 328 l10n_util::GetStringUTF16(IDS_MOBILE_NO_CONNECTION_HEADER));
329 strings.SetString("invalid_device_info_header", 329 strings.SetString("invalid_device_info_header",
330 l10n_util::GetStringUTF16(IDS_MOBILE_INVALID_DEVICE_INFO_HEADER)); 330 l10n_util::GetStringUTF16(IDS_MOBILE_INVALID_DEVICE_INFO_HEADER));
331 strings.SetString("title", l10n_util::GetStringUTF16(IDS_MOBILE_SETUP_TITLE)); 331 strings.SetString("title", l10n_util::GetStringUTF16(IDS_MOBILE_SETUP_TITLE));
332 strings.SetString("close_button", 332 strings.SetString("close_button",
333 l10n_util::GetStringUTF16(IDS_CLOSE)); 333 l10n_util::GetStringUTF16(IDS_CLOSE));
334 strings.SetString("cancel_button", 334 strings.SetString("cancel_button",
335 l10n_util::GetStringUTF16(IDS_CANCEL)); 335 l10n_util::GetStringUTF16(IDS_CANCEL));
336 strings.SetString("ok_button", 336 strings.SetString("ok_button",
337 l10n_util::GetStringUTF16(IDS_OK)); 337 l10n_util::GetStringUTF16(IDS_OK));
338 webui::SetFontAndTextDirection(&strings); 338 webui::SetTextDirection(&strings);
339 339
340 // The webui differs based on whether the network is activated or not. If the 340 // The webui differs based on whether the network is activated or not. If the
341 // network is activated, the webui goes straight to portal. Otherwise the 341 // network is activated, the webui goes straight to portal. Otherwise the
342 // webui is used for activation flow. 342 // webui is used for activation flow.
343 std::string full_html; 343 std::string full_html;
344 if (activation_state == shill::kActivationStateActivated) { 344 if (activation_state == shill::kActivationStateActivated) {
345 static const base::StringPiece html_for_activated( 345 static const base::StringPiece html_for_activated(
346 ResourceBundle::GetSharedInstance().GetRawDataResource( 346 ResourceBundle::GetSharedInstance().GetRawDataResource(
347 IDR_MOBILE_SETUP_PORTAL_PAGE_HTML)); 347 IDR_MOBILE_SETUP_PORTAL_PAGE_HTML));
348 full_html = webui::GetI18nTemplateHtml(html_for_activated, &strings); 348 full_html = webui::GetI18nTemplateHtml(html_for_activated, &strings);
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 const GURL& validated_url, 649 const GURL& validated_url,
650 int error_code, 650 int error_code,
651 const base::string16& error_description) { 651 const base::string16& error_description) {
652 if (render_frame_host->GetFrameName() != "paymentForm") 652 if (render_frame_host->GetFrameName() != "paymentForm")
653 return; 653 return;
654 654
655 base::FundamentalValue result_value(-error_code); 655 base::FundamentalValue result_value(-error_code);
656 web_ui()->CallJavascriptFunction(kJsPortalFrameLoadFailedCallback, 656 web_ui()->CallJavascriptFunction(kJsPortalFrameLoadFailedCallback,
657 result_value); 657 result_value);
658 } 658 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698