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

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

Issue 2925343002: Make WebUI MD login and lock screen default (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « chrome/browser/chromeos/login/chrome_restart_request.cc ('k') | chromeos/chromeos_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 source->AddLocalizedStrings(localized_strings); 136 source->AddLocalizedStrings(localized_strings);
137 source->SetJsonPath(kStringsJSPath); 137 source->SetJsonPath(kStringsJSPath);
138 138
139 if (display_type == OobeUI::kOobeDisplay) { 139 if (display_type == OobeUI::kOobeDisplay) {
140 source->SetDefaultResource(IDR_OOBE_HTML); 140 source->SetDefaultResource(IDR_OOBE_HTML);
141 source->AddResourcePath(kOobeJSPath, IDR_OOBE_JS); 141 source->AddResourcePath(kOobeJSPath, IDR_OOBE_JS);
142 source->AddResourcePath(kCustomElementsHTMLPath, 142 source->AddResourcePath(kCustomElementsHTMLPath,
143 IDR_CUSTOM_ELEMENTS_OOBE_HTML); 143 IDR_CUSTOM_ELEMENTS_OOBE_HTML);
144 source->AddResourcePath(kCustomElementsJSPath, IDR_CUSTOM_ELEMENTS_OOBE_JS); 144 source->AddResourcePath(kCustomElementsJSPath, IDR_CUSTOM_ELEMENTS_OOBE_JS);
145 } else if (display_type == OobeUI::kLockDisplay) { 145 } else if (display_type == OobeUI::kLockDisplay) {
146 if (command_line->HasSwitch(chromeos::switches::kShowNonViewMdLogin)) { 146 if (command_line->HasSwitch(chromeos::switches::kShowNonMdLogin)) {
147 source->SetDefaultResource(IDR_LOCK_HTML);
148 source->AddResourcePath(kLockJSPath, IDR_LOCK_JS);
149 source->AddResourcePath(kCustomElementsPinKeyboardHTMLPath,
150 IDR_CUSTOM_ELEMENTS_PIN_KEYBOARD_HTML);
151 source->AddResourcePath(kCustomElementsPinKeyboardJSPath,
152 IDR_CUSTOM_ELEMENTS_PIN_KEYBOARD_JS);
153 } else {
147 source->SetDefaultResource(IDR_MD_LOCK_HTML); 154 source->SetDefaultResource(IDR_MD_LOCK_HTML);
148 source->AddResourcePath(kLockJSPath, IDR_MD_LOCK_JS); 155 source->AddResourcePath(kLockJSPath, IDR_MD_LOCK_JS);
149 source->AddResourcePath(kCustomElementsPinKeyboardHTMLPath, 156 source->AddResourcePath(kCustomElementsPinKeyboardHTMLPath,
150 IDR_MD_CUSTOM_ELEMENTS_PIN_KEYBOARD_HTML); 157 IDR_MD_CUSTOM_ELEMENTS_PIN_KEYBOARD_HTML);
151 source->AddResourcePath(kCustomElementsPinKeyboardJSPath, 158 source->AddResourcePath(kCustomElementsPinKeyboardJSPath,
152 IDR_MD_CUSTOM_ELEMENTS_PIN_KEYBOARD_JS); 159 IDR_MD_CUSTOM_ELEMENTS_PIN_KEYBOARD_JS);
153 } else {
154 source->SetDefaultResource(IDR_LOCK_HTML);
155 source->AddResourcePath(kLockJSPath, IDR_LOCK_JS);
156 source->AddResourcePath(kCustomElementsPinKeyboardHTMLPath,
157 IDR_CUSTOM_ELEMENTS_PIN_KEYBOARD_HTML);
158 source->AddResourcePath(kCustomElementsPinKeyboardJSPath,
159 IDR_CUSTOM_ELEMENTS_PIN_KEYBOARD_JS);
160 } 160 }
161 source->AddResourcePath(kCustomElementsHTMLPath, 161 source->AddResourcePath(kCustomElementsHTMLPath,
162 IDR_CUSTOM_ELEMENTS_LOCK_HTML); 162 IDR_CUSTOM_ELEMENTS_LOCK_HTML);
163 source->AddResourcePath(kCustomElementsJSPath, IDR_CUSTOM_ELEMENTS_LOCK_JS); 163 source->AddResourcePath(kCustomElementsJSPath, IDR_CUSTOM_ELEMENTS_LOCK_JS);
164 source->AddResourcePath(kCustomElementsUserPodHTMLPath, 164 source->AddResourcePath(kCustomElementsUserPodHTMLPath,
165 IDR_CUSTOM_ELEMENTS_USER_POD_HTML); 165 IDR_CUSTOM_ELEMENTS_USER_POD_HTML);
166 } else { 166 } else {
167 if (command_line->HasSwitch(chromeos::switches::kShowMdLogin) || 167 if (command_line->HasSwitch(chromeos::switches::kShowNonMdLogin)) {
168 command_line->HasSwitch(chromeos::switches::kShowNonViewMdLogin)) { 168 source->SetDefaultResource(IDR_LOGIN_HTML);
169 source->AddResourcePath(kLoginJSPath, IDR_LOGIN_JS);
170 } else {
169 source->SetDefaultResource(IDR_MD_LOGIN_HTML); 171 source->SetDefaultResource(IDR_MD_LOGIN_HTML);
170 source->AddResourcePath(kLoginJSPath, IDR_MD_LOGIN_JS); 172 source->AddResourcePath(kLoginJSPath, IDR_MD_LOGIN_JS);
171 } else {
172 source->SetDefaultResource(IDR_LOGIN_HTML);
173 source->AddResourcePath(kLoginJSPath, IDR_LOGIN_JS);
174 } 173 }
175 source->AddResourcePath(kCustomElementsHTMLPath, 174 source->AddResourcePath(kCustomElementsHTMLPath,
176 IDR_CUSTOM_ELEMENTS_LOGIN_HTML); 175 IDR_CUSTOM_ELEMENTS_LOGIN_HTML);
177 source->AddResourcePath(kCustomElementsJSPath, 176 source->AddResourcePath(kCustomElementsJSPath,
178 IDR_CUSTOM_ELEMENTS_LOGIN_JS); 177 IDR_CUSTOM_ELEMENTS_LOGIN_JS);
179 source->AddResourcePath(kCustomElementsPinKeyboardHTMLPath, 178 source->AddResourcePath(kCustomElementsPinKeyboardHTMLPath,
180 IDR_CUSTOM_ELEMENTS_PIN_KEYBOARD_HTML); 179 IDR_CUSTOM_ELEMENTS_PIN_KEYBOARD_HTML);
181 source->AddResourcePath(kCustomElementsPinKeyboardJSPath, 180 source->AddResourcePath(kCustomElementsPinKeyboardJSPath,
182 IDR_CUSTOM_ELEMENTS_PIN_KEYBOARD_JS); 181 IDR_CUSTOM_ELEMENTS_PIN_KEYBOARD_JS);
183 source->AddResourcePath(kCustomElementsUserPodHTMLPath, 182 source->AddResourcePath(kCustomElementsUserPodHTMLPath,
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 GetLocalizedStrings(&localized_strings); 653 GetLocalizedStrings(&localized_strings);
655 static_cast<CoreOobeView*>(core_handler_)->ReloadContent(localized_strings); 654 static_cast<CoreOobeView*>(core_handler_)->ReloadContent(localized_strings);
656 } 655 }
657 656
658 void OobeUI::OnDisplayConfigurationChanged() { 657 void OobeUI::OnDisplayConfigurationChanged() {
659 if (oobe_display_chooser_) 658 if (oobe_display_chooser_)
660 oobe_display_chooser_->TryToPlaceUiOnTouchDisplay(); 659 oobe_display_chooser_->TryToPlaceUiOnTouchDisplay();
661 } 660 }
662 661
663 } // namespace chromeos 662 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/chrome_restart_request.cc ('k') | chromeos/chromeos_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698