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