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

Side by Side Diff: chrome/browser/resources/settings/device_page/stylus.js

Issue 2630623002: cros: Allow user to configure note taking app in md-settings. (Closed)
Patch Set: Initial upload Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-stylus' is the settings subpage with stylus-specific settings. 7 * 'settings-stylus' is the settings subpage with stylus-specific settings.
8 */ 8 */
9 9
10 /** @const */ var FIND_MORE_APPS_URL =
11 '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.
12
10 Polymer({ 13 Polymer({
11 is: 'settings-stylus', 14 is: 'settings-stylus',
12 15
13 properties: { 16 properties: {
14 /** Preferences state. */ 17 /** Preferences state. */
15 prefs: { 18 prefs: {
16 type: Object, 19 type: Object,
17 notify: true, 20 notify: true,
18 }, 21 },
19 } 22
23 /**
24 * Note taking apps the user can pick between.
25 * @type {Array<{name:string, value:string, preferred:boolean}>}
26 * @private
27 */
28 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
29
30 /**
31 * 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.
32 * @type {boolean}
stevenjb 2017/01/19 17:48:53 not needed, see below.
jdufault 2017/01/25 00:52:22 Done.
33 * @private
34 */
35 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
36 },
37
38 ready: function() {
39 cr.addWebUIListener(
40 'onNoteTakingAppsUpdated',
41 this.onNoteAppsUpdated_.bind(this));
42
43 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.
44 },
45
46 /** @private */
47 onSelectedAppChanged_: function() {
48 chrome.send('setPreferredNoteTakingApp', [this.$.menu.value]);
49 },
50
51 /** @private */
stevenjb 2017/01/19 17:48:53 Need @type for all args
jdufault 2017/01/25 00:52:22 Done.
52 onNoteAppsUpdated_: function(apps, waitingForAndroid) {
53 this.waitingForAndroid_ = waitingForAndroid;
54 this.appChoices_ = apps;
55 },
56
57 /** @private */
58 showNoApps_: function(apps, waitingForAndroid) {
59 return apps.length == 0 && !waitingForAndroid;
60 },
61
62 /** @private */
63 showApps_: function(apps, waitingForAndroid) {
64 return apps.length > 0 && !waitingForAndroid;
65 },
66
67 /** @private */
68 onFindAppsTap_: function() {
69 window.open(FIND_MORE_APPS_URL);
70 },
20 }); 71 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698