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

Unified Diff: chrome/browser/resources/chromeos/login/oobe_welcome.js

Issue 2564563004: ChromeOS MD-OOBE: Add Timezone Selection screen. (Closed)
Patch Set: Created 4 years 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/resources/chromeos/login/oobe_welcome.js
diff --git a/chrome/browser/resources/chromeos/login/oobe_welcome.js b/chrome/browser/resources/chromeos/login/oobe_welcome.js
index db32a89e4c7f1f5adcc999f26544c8c0ab21f59b..7f1fe1e249f53078e50adb3414bb3878c735f7b6 100644
--- a/chrome/browser/resources/chromeos/login/oobe_welcome.js
+++ b/chrome/browser/resources/chromeos/login/oobe_welcome.js
@@ -59,6 +59,14 @@ Polymer({
},
/**
+ * Flag that shows Timezone Selection screen.
+ */
+ timezoneScreenShown: {
+ type: Boolean,
+ value: false,
+ },
+
+ /**
* Flag that shows Network Selection screen.
*/
networkSelectionScreenShown: {
@@ -81,6 +89,23 @@ Polymer({
a11yStatus: {
type: Object,
},
+
+ /**
+ * A list of timezones for Timezone Selection screen.
+ * @type {!Array<OobeTypes.TimezoneDsc>}
+ */
+ timezones: {
+ type: Object,
+ value: [],
+ },
+
+ /**
+ * If UI uses forced keyboard navigation.
+ */
+ highlightStrength: {
+ type: String,
+ value: '',
+ },
},
/**
@@ -91,6 +116,7 @@ Polymer({
this.networkSelectionScreenShown = false;
this.languageSelectionScreenShown = false;
this.accessibilityOptionsScreenShown = false;
+ this.timezoneScreenShown = false;
},
/**
@@ -146,6 +172,20 @@ Polymer({
},
/**
+ * Returns true if timezone button should be visible.
+ * @private
+ */
+ isTimezoneButtonVisible_: function(highlightStrength) {
+ if (!highlightStrength)
+ return false;
+
+ if (highlightStrength == 'strong')
+ return true;
+
+ return false;
xiyuan 2016/12/09 17:50:59 nit: think we can do return highlightStrength =
Alexander Alekseev 2016/12/10 00:43:00 Done.
+ },
+
+ /**
* Handle "Next" button for "Welcome" screen.
*
* @private
@@ -176,6 +216,16 @@ Polymer({
},
/**
+ * Handle "Timezone" button for "Welcome" screen.
+ *
+ * @private
+ */
+ onWelcomeTimezoneButtonClicked_: function() {
+ this.hideAllScreens_();
+ this.timezoneScreenShown = true;
+ },
+
+ /**
* Handle Networwork Setup screen "Proxy settings" button.
*
* @private
@@ -345,4 +395,31 @@ Polymer({
chrome.send(
event.currentTarget.chromeMessage, [event.currentTarget.checked]);
},
+
+ /** ******************** Timezone section ******************* */
+
+ /**
+ * Handle "OK" button for "Timezone Selection" screen.
+ *
+ * @private
+ */
+ closeTimezoneSection_: function() {
+ this.hideAllScreens_();
+ this.welcomeScreenShown = true;
+ },
+
+ /**
+ * Handle timezone selection.
+ *
+ * @param {!{detail: {!OobeTypes.Timezone}}} event
+ * @private
+ */
+ onTimezoneSelected_: function(event) {
+ var item = event.detail;
+ if (!item)
+ return;
+
+ var timezone = item.value;
xiyuan 2016/12/09 17:50:59 nit: get rid of |timezone| and use item.value in p
Alexander Alekseev 2016/12/10 00:43:00 Done.
+ this.screen.onTimezoneSelected_(timezone);
+ },
});

Powered by Google App Engine
This is Rietveld 408576698