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

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: Address comments 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 c9b946b83e0f56c39b88fbf2fc87c243fc8124b7..a015dc622bddd9d98b164914e4d7bd17052e2ede 100644
--- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
@@ -101,10 +101,17 @@ const char kCustomElementsHTMLPath[] = "custom_elements.html";
const char kCustomElementsJSPath[] = "custom_elements.js";
// Paths for deferred resource loading.
+const char kCustomElementsPinHTMLPath[] = "custom_elements/pin.html";
+const char kCustomElementsPinCSSPath[] = "custom_elements/pin.css";
+const char kCustomElementsPinJSPath[] = "custom_elements/pin.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,
@@ -126,6 +133,15 @@ content::WebUIDataSource* CreateOobeUIDataSource(
source->AddResourcePath(kCustomElementsHTMLPath,
IDR_CUSTOM_ELEMENTS_LOCK_HTML);
source->AddResourcePath(kCustomElementsJSPath, IDR_CUSTOM_ELEMENTS_LOCK_JS);
+ source->AddResourcePath(kCustomElementsPinCSSPath,
+ IDR_CUSTOM_ELEMENTS_PIN_CSS);
+ source->AddResourcePath(kCustomElementsPinHTMLPath,
+ IDR_CUSTOM_ELEMENTS_PIN_HTML);
+ source->AddResourcePath(kCustomElementsPinJSPath,
+ IDR_CUSTOM_ELEMENTS_PIN_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