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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 source->AddResourcePath("gaia_auth_host.js", | 153 source->AddResourcePath("gaia_auth_host.js", |
154 StartupUtils::IsWebviewSigninEnabled() | 154 StartupUtils::IsWebviewSigninEnabled() |
155 ? IDR_GAIA_AUTH_AUTHENTICATOR_JS | 155 ? IDR_GAIA_AUTH_AUTHENTICATOR_JS |
156 : IDR_GAIA_AUTH_HOST_JS); | 156 : IDR_GAIA_AUTH_HOST_JS); |
157 | 157 |
158 // Serve deferred resources. | 158 // Serve deferred resources. |
159 source->AddResourcePath(kEnrollmentHTMLPath, IDR_OOBE_ENROLLMENT_HTML); | 159 source->AddResourcePath(kEnrollmentHTMLPath, IDR_OOBE_ENROLLMENT_HTML); |
160 source->AddResourcePath(kEnrollmentCSSPath, IDR_OOBE_ENROLLMENT_CSS); | 160 source->AddResourcePath(kEnrollmentCSSPath, IDR_OOBE_ENROLLMENT_CSS); |
161 source->AddResourcePath(kEnrollmentJSPath, IDR_OOBE_ENROLLMENT_JS); | 161 source->AddResourcePath(kEnrollmentJSPath, IDR_OOBE_ENROLLMENT_JS); |
162 | 162 |
163 if (display_type == OobeUI::kOobeDisplay) { | |
164 source->AddResourcePath("Roboto-Thin.ttf", IDR_FONT_ROBOTO_THIN); | |
165 source->AddResourcePath("Roboto-Light.ttf", IDR_FONT_ROBOTO_LIGHT); | |
166 source->AddResourcePath("Roboto-Regular.ttf", IDR_FONT_ROBOTO_REGULAR); | |
167 source->AddResourcePath("Roboto-Medium.ttf", IDR_FONT_ROBOTO_MEDIUM); | |
168 source->AddResourcePath("Roboto-Bold.ttf", IDR_FONT_ROBOTO_BOLD); | |
169 } | |
170 | |
171 // Only add a filter when runing as test. | 163 // Only add a filter when runing as test. |
172 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 164 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
173 const bool is_running_test = command_line->HasSwitch(::switches::kTestName) || | 165 const bool is_running_test = command_line->HasSwitch(::switches::kTestName) || |
174 command_line->HasSwitch(::switches::kTestType); | 166 command_line->HasSwitch(::switches::kTestType); |
175 if (is_running_test) | 167 if (is_running_test) |
176 source->SetRequestFilter(::test::GetTestFilesRequestFilter()); | 168 source->SetRequestFilter(::test::GetTestFilesRequestFilter()); |
177 | 169 |
178 return source; | 170 return source; |
179 } | 171 } |
180 | 172 |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 NOTIMPLEMENTED(); | 593 NOTIMPLEMENTED(); |
602 } | 594 } |
603 | 595 |
604 current_screen_ = new_screen; | 596 current_screen_ = new_screen; |
605 FOR_EACH_OBSERVER(Observer, | 597 FOR_EACH_OBSERVER(Observer, |
606 observer_list_, | 598 observer_list_, |
607 OnCurrentScreenChanged(current_screen_, new_screen)); | 599 OnCurrentScreenChanged(current_screen_, new_screen)); |
608 } | 600 } |
609 | 601 |
610 } // namespace chromeos | 602 } // namespace chromeos |
OLD | NEW |