| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 'cr-settings-startup-urls-page' is the settings page | 6 * @fileoverview 'cr-settings-startup-urls-page' is the settings page |
| 7 * containing the urls that will be opened when chrome is started. | 7 * containing the urls that will be opened when chrome is started. |
| 8 * | 8 * |
| 9 * Example: | 9 * Example: |
| 10 * | 10 * |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 onCancelTap_: function() { | 49 onCancelTap_: function() { |
| 50 this.set('prefs.session.startup_urls.value', this.savedUrlList.slice()); | 50 this.set('prefs.session.startup_urls.value', this.savedUrlList.slice()); |
| 51 }, | 51 }, |
| 52 | 52 |
| 53 /** @private */ | 53 /** @private */ |
| 54 onOkTap_: function() { | 54 onOkTap_: function() { |
| 55 var value = this.newUrl && this.newUrl.trim(); | 55 var value = this.newUrl && this.newUrl.trim(); |
| 56 if (!value) | 56 if (!value) |
| 57 return; | 57 return; |
| 58 this.push('prefs.session.startup_urls.value', value); | 58 this.push('prefs.session.startup_urls.value', value); |
| 59 this.newUrl = undefined; | 59 this.newUrl = ''; |
| 60 }, | 60 }, |
| 61 | 61 |
| 62 /** @private */ | 62 /** |
| 63 * @param {!{model: !{index: number}}} e |
| 64 * @private |
| 65 */ |
| 63 onRemoveUrlTap_: function(e) { | 66 onRemoveUrlTap_: function(e) { |
| 64 this.splice('prefs.session.startup_urls.value', e.model.index, 1); | 67 this.splice('prefs.session.startup_urls.value', e.model.index, 1); |
| 65 }, | 68 }, |
| 66 }); | 69 }); |
| OLD | NEW |