| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 OobeScreen::SCREEN_USER_IMAGE_PICKER | 94 OobeScreen::SCREEN_USER_IMAGE_PICKER |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 const char kStringsJSPath[] = "strings.js"; | 97 const char kStringsJSPath[] = "strings.js"; |
| 98 const char kLockJSPath[] = "lock.js"; | 98 const char kLockJSPath[] = "lock.js"; |
| 99 const char kLoginJSPath[] = "login.js"; | 99 const char kLoginJSPath[] = "login.js"; |
| 100 const char kOobeJSPath[] = "oobe.js"; | 100 const char kOobeJSPath[] = "oobe.js"; |
| 101 const char kKeyboardUtilsJSPath[] = "keyboard_utils.js"; | 101 const char kKeyboardUtilsJSPath[] = "keyboard_utils.js"; |
| 102 const char kCustomElementsHTMLPath[] = "custom_elements.html"; | 102 const char kCustomElementsHTMLPath[] = "custom_elements.html"; |
| 103 const char kCustomElementsJSPath[] = "custom_elements.js"; | 103 const char kCustomElementsJSPath[] = "custom_elements.js"; |
| 104 const char kCustomElementsUserPodHTMLPath[] = "custom_elements_user_pod.html"; |
| 104 | 105 |
| 105 // Paths for deferred resource loading. | 106 // Paths for deferred resource loading. |
| 106 const char kCustomElementsPinKeyboardHTMLPath[] = | 107 const char kCustomElementsPinKeyboardHTMLPath[] = |
| 107 "custom_elements/pin_keyboard.html"; | 108 "custom_elements/pin_keyboard.html"; |
| 108 const char kCustomElementsPinKeyboardJSPath[] = | 109 const char kCustomElementsPinKeyboardJSPath[] = |
| 109 "custom_elements/pin_keyboard.js"; | 110 "custom_elements/pin_keyboard.js"; |
| 110 const char kEnrollmentHTMLPath[] = "enrollment.html"; | 111 const char kEnrollmentHTMLPath[] = "enrollment.html"; |
| 111 const char kEnrollmentCSSPath[] = "enrollment.css"; | 112 const char kEnrollmentCSSPath[] = "enrollment.css"; |
| 112 const char kEnrollmentJSPath[] = "enrollment.js"; | 113 const char kEnrollmentJSPath[] = "enrollment.js"; |
| 113 | 114 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 129 } else if (display_type == OobeUI::kLockDisplay) { | 130 } else if (display_type == OobeUI::kLockDisplay) { |
| 130 source->SetDefaultResource(IDR_LOCK_HTML); | 131 source->SetDefaultResource(IDR_LOCK_HTML); |
| 131 source->AddResourcePath(kLockJSPath, IDR_LOCK_JS); | 132 source->AddResourcePath(kLockJSPath, IDR_LOCK_JS); |
| 132 source->AddResourcePath(kCustomElementsHTMLPath, | 133 source->AddResourcePath(kCustomElementsHTMLPath, |
| 133 IDR_CUSTOM_ELEMENTS_LOCK_HTML); | 134 IDR_CUSTOM_ELEMENTS_LOCK_HTML); |
| 134 source->AddResourcePath(kCustomElementsJSPath, IDR_CUSTOM_ELEMENTS_LOCK_JS); | 135 source->AddResourcePath(kCustomElementsJSPath, IDR_CUSTOM_ELEMENTS_LOCK_JS); |
| 135 source->AddResourcePath(kCustomElementsPinKeyboardHTMLPath, | 136 source->AddResourcePath(kCustomElementsPinKeyboardHTMLPath, |
| 136 IDR_CUSTOM_ELEMENTS_PIN_KEYBOARD_HTML); | 137 IDR_CUSTOM_ELEMENTS_PIN_KEYBOARD_HTML); |
| 137 source->AddResourcePath(kCustomElementsPinKeyboardJSPath, | 138 source->AddResourcePath(kCustomElementsPinKeyboardJSPath, |
| 138 IDR_CUSTOM_ELEMENTS_PIN_KEYBOARD_JS); | 139 IDR_CUSTOM_ELEMENTS_PIN_KEYBOARD_JS); |
| 140 source->AddResourcePath(kCustomElementsUserPodHTMLPath, |
| 141 IDR_CUSTOM_ELEMENTS_USER_POD_HTML); |
| 139 } else { | 142 } else { |
| 140 source->SetDefaultResource(IDR_LOGIN_HTML); | 143 source->SetDefaultResource(IDR_LOGIN_HTML); |
| 141 source->AddResourcePath(kLoginJSPath, IDR_LOGIN_JS); | 144 source->AddResourcePath(kLoginJSPath, IDR_LOGIN_JS); |
| 142 source->AddResourcePath(kCustomElementsHTMLPath, | 145 source->AddResourcePath(kCustomElementsHTMLPath, |
| 143 IDR_CUSTOM_ELEMENTS_LOGIN_HTML); | 146 IDR_CUSTOM_ELEMENTS_LOGIN_HTML); |
| 144 source->AddResourcePath(kCustomElementsJSPath, | 147 source->AddResourcePath(kCustomElementsJSPath, |
| 145 IDR_CUSTOM_ELEMENTS_LOGIN_JS); | 148 IDR_CUSTOM_ELEMENTS_LOGIN_JS); |
| 149 source->AddResourcePath(kCustomElementsUserPodHTMLPath, |
| 150 IDR_CUSTOM_ELEMENTS_USER_POD_HTML); |
| 146 } | 151 } |
| 147 source->AddResourcePath(kKeyboardUtilsJSPath, IDR_KEYBOARD_UTILS_JS); | 152 source->AddResourcePath(kKeyboardUtilsJSPath, IDR_KEYBOARD_UTILS_JS); |
| 148 source->OverrideContentSecurityPolicyChildSrc( | 153 source->OverrideContentSecurityPolicyChildSrc( |
| 149 base::StringPrintf( | 154 base::StringPrintf( |
| 150 "child-src chrome://terms/ %s/;", | 155 "child-src chrome://terms/ %s/;", |
| 151 extensions::kGaiaAuthExtensionOrigin)); | 156 extensions::kGaiaAuthExtensionOrigin)); |
| 152 source->OverrideContentSecurityPolicyObjectSrc( | 157 source->OverrideContentSecurityPolicyObjectSrc( |
| 153 "object-src chrome:;"); | 158 "object-src chrome:;"); |
| 154 source->AddResourcePath("gaia_auth_host.js", | 159 source->AddResourcePath("gaia_auth_host.js", |
| 155 StartupUtils::IsWebviewSigninEnabled() | 160 StartupUtils::IsWebviewSigninEnabled() |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 FOR_EACH_OBSERVER(Observer, | 603 FOR_EACH_OBSERVER(Observer, |
| 599 observer_list_, | 604 observer_list_, |
| 600 OnCurrentScreenChanged(current_screen_, new_screen)); | 605 OnCurrentScreenChanged(current_screen_, new_screen)); |
| 601 } | 606 } |
| 602 | 607 |
| 603 void OobeUI::EnableMdOobe() { | 608 void OobeUI::EnableMdOobe() { |
| 604 md_oobe_enabled_ = true; | 609 md_oobe_enabled_ = true; |
| 605 } | 610 } |
| 606 | 611 |
| 607 } // namespace chromeos | 612 } // namespace chromeos |
| OLD | NEW |