| Index: chrome/browser/resources/shared/js/cr.js
|
| diff --git a/chrome/browser/resources/shared/js/cr.js b/chrome/browser/resources/shared/js/cr.js
|
| index fb47a8aae9dacca9838f1a5dcc729ea7eaccddb7..d9479f9e9c43b246b1689103d92c762f75e0b893 100644
|
| --- a/chrome/browser/resources/shared/js/cr.js
|
| +++ b/chrome/browser/resources/shared/js/cr.js
|
| @@ -23,12 +23,6 @@ const cr = (function() {
|
| const isChromeOS = /CrOS/.test(navigator.userAgent);
|
|
|
| /**
|
| - * Whether this is on touchui build or not.
|
| - * @type {boolean}
|
| - */
|
| - const isTouch = /Touch/.test(navigator.userAgent);
|
| -
|
| - /**
|
| * Whether this is on vanilla Linux (not chromeOS).
|
| * @type {boolean}
|
| */
|
| @@ -47,6 +41,12 @@ const cr = (function() {
|
| const isViews = /views/.test(chrome.toolkit);
|
|
|
| /**
|
| + * Whether this window is optimized for touch-based input.
|
| + * @type {boolean}
|
| + */
|
| + const isTouchOptimized = !!chrome.touchOptimized;
|
| +
|
| + /**
|
| * Sets the os and toolkit attributes in the <html> element so that platform
|
| * specific css rules can be applied.
|
| */
|
| @@ -63,6 +63,8 @@ const cr = (function() {
|
| doc.documentElement.setAttribute('toolkit', 'gtk');
|
| if (isViews)
|
| doc.documentElement.setAttribute('toolkit', 'views');
|
| + if (isTouchOptimized)
|
| + doc.documentElement.setAttribute('touch-optimized', '');
|
| }
|
|
|
| /**
|
| @@ -372,7 +374,7 @@ const cr = (function() {
|
| isWindows: isWindows,
|
| isLinux: isLinux,
|
| isViews: isViews,
|
| - isTouch: isTouch,
|
| + isTouchOptimized: isTouchOptimized,
|
| enablePlatformSpecificCSSRules: enablePlatformSpecificCSSRules,
|
| define: define,
|
| defineProperty: defineProperty,
|
|
|