Chromium Code Reviews| Index: chrome/browser/resources/settings/device_page/stylus.js |
| diff --git a/chrome/browser/resources/settings/device_page/stylus.js b/chrome/browser/resources/settings/device_page/stylus.js |
| index a31df1d433c5b0290731fa10c112a73d6955aa59..a2676a10365119d64cb46a834e922e9b47cb12fd 100644 |
| --- a/chrome/browser/resources/settings/device_page/stylus.js |
| +++ b/chrome/browser/resources/settings/device_page/stylus.js |
| @@ -7,6 +7,9 @@ |
| * 'settings-stylus' is the settings subpage with stylus-specific settings. |
| */ |
| +/** @const */ var FIND_MORE_APPS_URL = |
| + 'https://play.google.com/store/apps/collection/promotion_30023cb_stylus_apps'; |
|
stevenjb
2017/01/19 17:48:53
Use '+' and multiple strings to avoid wrapping.
jdufault
2017/01/25 00:52:22
Done.
|
| + |
| Polymer({ |
| is: 'settings-stylus', |
| @@ -16,5 +19,53 @@ Polymer({ |
| type: Object, |
| notify: true, |
| }, |
| - } |
| + |
| + /** |
| + * Note taking apps the user can pick between. |
| + * @type {Array<{name:string, value:string, preferred:boolean}>} |
| + * @private |
| + */ |
| + appChoices_: [], |
|
stevenjb
2017/01/19 17:48:53
appChoices_ : {
type: Array,
value: function()
jdufault
2017/01/25 00:52:22
Done, since this makes it clearer. However, we nev
|
| + |
| + /** |
| + * True if the arc++ container has not finished starting yet. |
|
Daniel Erat
2017/01/19 00:50:05
nit: i think i read/heard somewhere that we just c
jdufault
2017/01/25 00:52:22
Done.
|
| + * @type {boolean} |
|
stevenjb
2017/01/19 17:48:53
not needed, see below.
jdufault
2017/01/25 00:52:22
Done.
|
| + * @private |
| + */ |
| + waitingForAndroid_: false, |
|
stevenjb
2017/01/19 17:48:53
waitingForAndroid_: {
type: Boolean,
value: fa
jdufault
2017/01/25 00:52:22
Done. It's strange that if closure can understand
|
| + }, |
| + |
| + ready: function() { |
| + cr.addWebUIListener( |
| + 'onNoteTakingAppsUpdated', |
| + this.onNoteAppsUpdated_.bind(this)); |
| + |
| + chrome.send('requestNoteTakingApps'); |
|
stevenjb
2017/01/19 17:48:53
In order to test this we will want to set up a pro
jdufault
2017/01/25 00:52:22
Done.
|
| + }, |
| + |
| + /** @private */ |
| + onSelectedAppChanged_: function() { |
| + chrome.send('setPreferredNoteTakingApp', [this.$.menu.value]); |
| + }, |
| + |
| + /** @private */ |
|
stevenjb
2017/01/19 17:48:53
Need @type for all args
jdufault
2017/01/25 00:52:22
Done.
|
| + onNoteAppsUpdated_: function(apps, waitingForAndroid) { |
| + this.waitingForAndroid_ = waitingForAndroid; |
| + this.appChoices_ = apps; |
| + }, |
| + |
| + /** @private */ |
| + showNoApps_: function(apps, waitingForAndroid) { |
| + return apps.length == 0 && !waitingForAndroid; |
| + }, |
| + |
| + /** @private */ |
| + showApps_: function(apps, waitingForAndroid) { |
| + return apps.length > 0 && !waitingForAndroid; |
| + }, |
| + |
| + /** @private */ |
| + onFindAppsTap_: function() { |
| + window.open(FIND_MORE_APPS_URL); |
| + }, |
| }); |