| 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..d04fc94845ed0db65b52637e853d203f4df22cd1 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';
|
| +
|
| Polymer({
|
| is: 'settings-stylus',
|
|
|
| @@ -16,5 +19,76 @@ Polymer({
|
| type: Object,
|
| notify: true,
|
| },
|
| - }
|
| +
|
| + /**
|
| + * Note taking apps the user can pick between.
|
| + * @type {Array<{name:string, value:string, preferred:boolean}>}
|
| + * @private
|
| + */
|
| + appChoices_: {
|
| + type: Array,
|
| + value: function() { return []; }
|
| + },
|
| +
|
| + /**
|
| + * True if the ARC container has not finished starting yet.
|
| + * @private
|
| + */
|
| + waitingForAndroid_: {
|
| + type: Boolean,
|
| + value: false
|
| + },
|
| + },
|
| +
|
| +
|
| + /** @private {?settings.DevicePageBrowserProxy} */
|
| + browserProxy_: null,
|
| +
|
| + created: function() {
|
| + this.browserProxy_ = settings.DevicePageBrowserProxyImpl.getInstance();
|
| + },
|
| +
|
| + ready: function() {
|
| + this.browserProxy_.setNoteTakingAppsUpdatedCallback(
|
| + this.onNoteAppsUpdated_.bind(this));
|
| + this.browserProxy_.requestNoteTakingApps();
|
| + },
|
| +
|
| + /** @private */
|
| + onSelectedAppChanged_: function() {
|
| + this.browserProxy_.setPreferredNoteTakingApp(this.$.menu.value);
|
| + },
|
| +
|
| + /**
|
| + * @param {Array<settings.NoteAppInfo>} apps
|
| + * @param {boolean} waitingForAndroid
|
| + * @private
|
| + */
|
| + onNoteAppsUpdated_: function(apps, waitingForAndroid) {
|
| + this.waitingForAndroid_ = waitingForAndroid;
|
| + this.appChoices_ = apps;
|
| + },
|
| +
|
| + /**
|
| + * @param {Array<settings.NoteAppInfo>} apps
|
| + * @param {boolean} waitingForAndroid
|
| + * @private
|
| + */
|
| + showNoApps_: function(apps, waitingForAndroid) {
|
| + return apps.length == 0 && !waitingForAndroid;
|
| + },
|
| +
|
| + /**
|
| + * @param {Array<settings.NoteAppInfo>} apps
|
| + * @param {boolean} waitingForAndroid
|
| + * @private
|
| + */
|
| + showApps_: function(apps, waitingForAndroid) {
|
| + return apps.length > 0 && !waitingForAndroid;
|
| + },
|
| +
|
| + /** @private */
|
| + onFindAppsTap_: function() {
|
| + window.open(FIND_MORE_APPS_URL);
|
| + },
|
| });
|
|
|