| OLD | NEW |
| 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 = 'https://play.google.com/store/apps/' + | 10 /** @const */ var FIND_MORE_APPS_URL = 'https://play.google.com/store/apps/' + |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 /** | 72 /** |
| 73 * Finds note app info with the provided app id. | 73 * Finds note app info with the provided app id. |
| 74 * @param {!string} id | 74 * @param {!string} id |
| 75 * @return {?settings.NoteAppInfo} | 75 * @return {?settings.NoteAppInfo} |
| 76 * @private | 76 * @private |
| 77 */ | 77 */ |
| 78 findApp_: function(id) { | 78 findApp_: function(id) { |
| 79 return this.appChoices_.find(function(app) { | 79 return this.appChoices_.find(function(app) { |
| 80 return app.value == id; | 80 return app.value == id; |
| 81 }) || null; | 81 }) || |
| 82 null; |
| 82 }, | 83 }, |
| 83 | 84 |
| 84 /** @private */ | 85 /** @private */ |
| 85 onSelectedAppChanged_: function() { | 86 onSelectedAppChanged_: function() { |
| 86 var app = this.findApp_(this.$.menu.value); | 87 var app = this.findApp_(this.$.menu.value); |
| 87 this.selectedApp_ = app; | 88 this.selectedApp_ = app; |
| 88 | 89 |
| 89 if (app && !app.preferred) | 90 if (app && !app.preferred) |
| 90 this.browserProxy_.setPreferredNoteTakingApp(app.value); | 91 this.browserProxy_.setPreferredNoteTakingApp(app.value); |
| 91 }, | 92 }, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 119 */ | 120 */ |
| 120 showApps_: function(apps, waitingForAndroid) { | 121 showApps_: function(apps, waitingForAndroid) { |
| 121 return apps.length > 0 && !waitingForAndroid; | 122 return apps.length > 0 && !waitingForAndroid; |
| 122 }, | 123 }, |
| 123 | 124 |
| 124 /** @private */ | 125 /** @private */ |
| 125 onFindAppsTap_: function() { | 126 onFindAppsTap_: function() { |
| 126 this.browserProxy_.showPlayStore(FIND_MORE_APPS_URL); | 127 this.browserProxy_.showPlayStore(FIND_MORE_APPS_URL); |
| 127 }, | 128 }, |
| 128 }); | 129 }); |
| OLD | NEW |