| 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/oobe_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 const char kCustomElementsPinKeyboardHTMLPath[] = | 111 const char kCustomElementsPinKeyboardHTMLPath[] = |
| 112 "custom_elements/pin_keyboard.html"; | 112 "custom_elements/pin_keyboard.html"; |
| 113 const char kCustomElementsPinKeyboardJSPath[] = | 113 const char kCustomElementsPinKeyboardJSPath[] = |
| 114 "custom_elements/pin_keyboard.js"; | 114 "custom_elements/pin_keyboard.js"; |
| 115 const char kEnrollmentHTMLPath[] = "enrollment.html"; | 115 const char kEnrollmentHTMLPath[] = "enrollment.html"; |
| 116 const char kEnrollmentCSSPath[] = "enrollment.css"; | 116 const char kEnrollmentCSSPath[] = "enrollment.css"; |
| 117 const char kEnrollmentJSPath[] = "enrollment.js"; | 117 const char kEnrollmentJSPath[] = "enrollment.js"; |
| 118 const char kArcPlaystoreCSSPath[] = "playstore.css"; | 118 const char kArcPlaystoreCSSPath[] = "playstore.css"; |
| 119 const char kArcPlaystoreJSPath[] = "playstore.js"; | 119 const char kArcPlaystoreJSPath[] = "playstore.js"; |
| 120 const char kArcPlaystoreLogoPath[] = "playstore.svg"; | 120 const char kArcPlaystoreLogoPath[] = "playstore.svg"; |
| 121 const char kProductLogoPath[] = "product-logo.png"; |
| 121 | 122 |
| 122 // Creates a WebUIDataSource for chrome://oobe | 123 // Creates a WebUIDataSource for chrome://oobe |
| 123 content::WebUIDataSource* CreateOobeUIDataSource( | 124 content::WebUIDataSource* CreateOobeUIDataSource( |
| 124 const base::DictionaryValue& localized_strings, | 125 const base::DictionaryValue& localized_strings, |
| 125 const std::string& display_type) { | 126 const std::string& display_type) { |
| 126 content::WebUIDataSource* source = | 127 content::WebUIDataSource* source = |
| 127 content::WebUIDataSource::Create(chrome::kChromeUIOobeHost); | 128 content::WebUIDataSource::Create(chrome::kChromeUIOobeHost); |
| 128 source->AddLocalizedStrings(localized_strings); | 129 source->AddLocalizedStrings(localized_strings); |
| 129 source->SetJsonPath(kStringsJSPath); | 130 source->SetJsonPath(kStringsJSPath); |
| 130 | 131 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 156 source->AddResourcePath(kCustomElementsUserPodHTMLPath, | 157 source->AddResourcePath(kCustomElementsUserPodHTMLPath, |
| 157 IDR_CUSTOM_ELEMENTS_USER_POD_HTML); | 158 IDR_CUSTOM_ELEMENTS_USER_POD_HTML); |
| 158 } | 159 } |
| 159 | 160 |
| 160 // Required for postprocessing of Goolge PlayStore Terms. | 161 // Required for postprocessing of Goolge PlayStore Terms. |
| 161 source->AddResourcePath(kArcPlaystoreCSSPath, IDR_ARC_SUPPORT_PLAYSTORE_CSS); | 162 source->AddResourcePath(kArcPlaystoreCSSPath, IDR_ARC_SUPPORT_PLAYSTORE_CSS); |
| 162 source->AddResourcePath(kArcPlaystoreJSPath, IDR_ARC_SUPPORT_PLAYSTORE_JS); | 163 source->AddResourcePath(kArcPlaystoreJSPath, IDR_ARC_SUPPORT_PLAYSTORE_JS); |
| 163 source->AddResourcePath(kArcPlaystoreLogoPath, | 164 source->AddResourcePath(kArcPlaystoreLogoPath, |
| 164 IDR_ARC_SUPPORT_PLAYSTORE_LOGO); | 165 IDR_ARC_SUPPORT_PLAYSTORE_LOGO); |
| 165 | 166 |
| 167 // Required in encryption migration screen. |
| 168 source->AddResourcePath(kProductLogoPath, IDR_PRODUCT_LOGO_64); |
| 169 |
| 166 source->AddResourcePath(kKeyboardUtilsJSPath, IDR_KEYBOARD_UTILS_JS); | 170 source->AddResourcePath(kKeyboardUtilsJSPath, IDR_KEYBOARD_UTILS_JS); |
| 167 source->OverrideContentSecurityPolicyChildSrc( | 171 source->OverrideContentSecurityPolicyChildSrc( |
| 168 base::StringPrintf( | 172 base::StringPrintf( |
| 169 "child-src chrome://terms/ %s/;", | 173 "child-src chrome://terms/ %s/;", |
| 170 extensions::kGaiaAuthExtensionOrigin)); | 174 extensions::kGaiaAuthExtensionOrigin)); |
| 171 source->OverrideContentSecurityPolicyObjectSrc( | 175 source->OverrideContentSecurityPolicyObjectSrc( |
| 172 "object-src chrome:;"); | 176 "object-src chrome:;"); |
| 173 | 177 |
| 174 // Serve deferred resources. | 178 // Serve deferred resources. |
| 175 source->AddResourcePath(kEnrollmentHTMLPath, IDR_OOBE_ENROLLMENT_HTML); | 179 source->AddResourcePath(kEnrollmentHTMLPath, IDR_OOBE_ENROLLMENT_HTML); |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 g_browser_process->local_state()->GetBoolean(prefs::kOobeMdMode)) { | 596 g_browser_process->local_state()->GetBoolean(prefs::kOobeMdMode)) { |
| 593 return; | 597 return; |
| 594 } | 598 } |
| 595 | 599 |
| 596 base::DictionaryValue localized_strings; | 600 base::DictionaryValue localized_strings; |
| 597 GetLocalizedStrings(&localized_strings); | 601 GetLocalizedStrings(&localized_strings); |
| 598 static_cast<CoreOobeView*>(core_handler_)->ReloadContent(localized_strings); | 602 static_cast<CoreOobeView*>(core_handler_)->ReloadContent(localized_strings); |
| 599 } | 603 } |
| 600 | 604 |
| 601 } // namespace chromeos | 605 } // namespace chromeos |
| OLD | NEW |