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

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

Issue 1933913002: Add a very basic PIN UI implementation that is shared between lock and settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Fix tests by removing a previously unused import that started getting used b/c of resource loader c… Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
index 9a0d07d3cd75825573cc44400f371bc409b38aea..80077cecfa7565a74b98d63f617b70415f5f4b75 100644
--- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
@@ -102,10 +102,18 @@ const char kCustomElementsHTMLPath[] = "custom_elements.html";
const char kCustomElementsJSPath[] = "custom_elements.js";
// Paths for deferred resource loading.
+const char kCustomElementsPinKeyboardHTMLPath[] =
+ "custom_elements/pin_keyboard.html";
+const char kCustomElementsPinKeyboardJSPath[] =
+ "custom_elements/pin_keyboard.js";
const char kEnrollmentHTMLPath[] = "enrollment.html";
const char kEnrollmentCSSPath[] = "enrollment.css";
const char kEnrollmentJSPath[] = "enrollment.js";
+// Shared parameter with JS that enables or disables the PIN screen. This needs
+// to stay synchronized with the JS definition.
+const char kShowPinKey[] = "showPin";
+
// Creates a WebUIDataSource for chrome://oobe
content::WebUIDataSource* CreateOobeUIDataSource(
const base::DictionaryValue& localized_strings,
@@ -127,6 +135,13 @@ content::WebUIDataSource* CreateOobeUIDataSource(
source->AddResourcePath(kCustomElementsHTMLPath,
IDR_CUSTOM_ELEMENTS_LOCK_HTML);
source->AddResourcePath(kCustomElementsJSPath, IDR_CUSTOM_ELEMENTS_LOCK_JS);
+ source->AddResourcePath(kCustomElementsPinKeyboardHTMLPath,
+ IDR_CUSTOM_ELEMENTS_PIN_KEYBOARD_HTML);
+ source->AddResourcePath(kCustomElementsPinKeyboardJSPath,
+ IDR_CUSTOM_ELEMENTS_PIN_KEYBOARD_JS);
+
+ // TODO(jdufault): Dynamically show pin when it is enabled.
+ source->AddBoolean(kShowPinKey, false);
} else {
source->SetDefaultResource(IDR_LOGIN_HTML);
source->AddResourcePath(kLoginJSPath, IDR_LOGIN_JS);

Powered by Google App Engine
This is Rietveld 408576698