Chromium Code Reviews| Index: chrome/browser/resources/welcome/win10/inline.js |
| diff --git a/chrome/browser/resources/welcome/win10/inline.js b/chrome/browser/resources/welcome/win10/inline.js |
| index 02555f6b616419d7f0c3a8e0c5a0f6a11b8db6b8..e45a119ed85b266f9925f11d0a5cfd9738418551 100644 |
| --- a/chrome/browser/resources/welcome/win10/inline.js |
| +++ b/chrome/browser/resources/welcome/win10/inline.js |
| @@ -5,6 +5,12 @@ |
| cr.define('inline', function() { |
| 'use strict'; |
| + function computeClasses(isCombined) { |
| + if (isCombined) |
| + return 'section expandable expanded'; |
| + return 'section'; |
| + } |
| + |
| function onContinue() { |
| chrome.send('handleContinue'); |
| } |
| @@ -22,22 +28,24 @@ cr.define('inline', function() { |
| } |
| } |
| - function computeClasses(isCombined) { |
| - if (isCombined) |
| - return 'section expandable expanded'; |
| - return 'section'; |
| - } |
| - |
| function initialize() { |
| var app = $('inline-app'); |
| - app.isCombined = window.location.href.includes('variant=combined'); |
| + // Set variables. |
| + app.isCombined = false; |
| // Set handlers. |
| app.computeClasses = computeClasses; |
| app.onContinue = onContinue; |
| app.onOpenSettings = onOpenSettings; |
| app.onToggle = onToggle.bind(this, app); |
| + |
| + // Asynchronously check if Chrome is pinned to the taskbar. |
| + cr.sendWithPromise('handleIsPinnedToTaskbar').then( |
| + function(isPinnedToTaskbar) { |
| + // Show the combined variant if Chrome is not pinned. |
|
tmartino
2016/10/28 15:18:04
Can we document this in the first place the variab
Patrick Monette
2016/10/28 21:21:37
Done.
|
| + app.isCombined = !isPinnedToTaskbar; |
| + }); |
| } |
| return { |