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

Unified Diff: ui/login/account_picker/user_pod_row.js

Issue 471973002: Single pod autofocus disabled for touch view mode. Delegate class created for ash interactions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Dummy handler added. Created 6 years, 3 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
« no previous file with comments | « ui/login/account_picker/screen_account_picker.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/login/account_picker/user_pod_row.js
diff --git a/ui/login/account_picker/user_pod_row.js b/ui/login/account_picker/user_pod_row.js
index 6828093a94a1f4cfc9d3376d92de2649e0775c57..356a1a61fd814cc8e5a1c72184d5d66be5262431 100644
--- a/ui/login/account_picker/user_pod_row.js
+++ b/ui/login/account_picker/user_pod_row.js
@@ -2005,6 +2005,10 @@ cr.define('login', function() {
// Array of users that are shown (public/supervised/regular).
users_: [],
+ // If we're disabling single pod autofocus for Touch View.
+ touchViewSinglePodExperimentOn_: true,
+
+
/** @override */
decorate: function() {
// Event listeners that are installed for the time period during which
@@ -2034,14 +2038,17 @@ cr.define('login', function() {
/**
* Return true if user pod row has only single user pod in it, which should
- * always be focused.
+ * always be focused except desktop and touch view modes.
* @type {boolean}
*/
get alwaysFocusSinglePod() {
var isDesktopUserManager = Oobe.getInstance().displayType ==
DISPLAY_TYPE.DESKTOP_USER_MANAGER;
- return isDesktopUserManager ? false : this.children.length == 1;
+ return (isDesktopUserManager ||
+ (this.touchViewSinglePodExperimentOn_ &&
+ this.touchViewEnabled_)) ?
+ false : this.children.length == 1;
},
/**
@@ -2372,6 +2379,14 @@ cr.define('login', function() {
},
/**
+ * Sets the state of touch view mode.
+ * @param {boolean} isTouchViewEnabled true if the mode is on.
+ */
+ setTouchViewState: function(isTouchViewEnabled) {
+ this.touchViewEnabled_ = isTouchViewEnabled;
+ },
+
+ /**
* Updates the display name shown on a public session pod.
* @param {string} userID The user ID of the public session
* @param {string} displayName The new display name
« no previous file with comments | « ui/login/account_picker/screen_account_picker.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698