| 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 'settings-startup-urls-page' is the settings page | 6 * @fileoverview '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 | 9 |
| 10 Polymer({ | 10 Polymer({ |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * Pages to load upon browser startup. | 22 * Pages to load upon browser startup. |
| 23 * @private {!Array<!StartupPageInfo>} | 23 * @private {!Array<!StartupPageInfo>} |
| 24 */ | 24 */ |
| 25 startupPages_: Array, | 25 startupPages_: Array, |
| 26 | 26 |
| 27 /** @private */ | 27 /** @private */ |
| 28 showStartupUrlDialog_: Boolean, | 28 showStartupUrlDialog_: Boolean, |
| 29 | 29 |
| 30 /** @private {?StartupPageInfo} */ | 30 /** @private {?StartupPageInfo} */ |
| 31 startupUrlDialogModel_: Object, | 31 startupUrlDialogModel_: Object, |
| 32 |
| 33 /** @private {Object}*/ |
| 34 lastFocused_: Object, |
| 32 }, | 35 }, |
| 33 | 36 |
| 34 /** @override */ | 37 /** @override */ |
| 35 attached: function() { | 38 attached: function() { |
| 36 this.browserProxy_ = settings.StartupUrlsPageBrowserProxyImpl.getInstance(); | 39 this.browserProxy_ = settings.StartupUrlsPageBrowserProxyImpl.getInstance(); |
| 37 this.addWebUIListener('update-startup-pages', function(startupPages) { | 40 this.addWebUIListener('update-startup-pages', function(startupPages) { |
| 38 // If an "edit" URL dialog was open, close it, because the underlying page | 41 // If an "edit" URL dialog was open, close it, because the underlying page |
| 39 // might have just been removed (and model indices have changed anyway). | 42 // might have just been removed (and model indices have changed anyway). |
| 40 if (this.startupUrlDialogModel_) | 43 if (this.startupUrlDialogModel_) |
| 41 this.destroyUrlDialog_(); | 44 this.destroyUrlDialog_(); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 64 destroyUrlDialog_: function() { | 67 destroyUrlDialog_: function() { |
| 65 this.showStartupUrlDialog_ = false; | 68 this.showStartupUrlDialog_ = false; |
| 66 this.startupUrlDialogModel_ = null; | 69 this.startupUrlDialogModel_ = null; |
| 67 }, | 70 }, |
| 68 | 71 |
| 69 /** @private */ | 72 /** @private */ |
| 70 onUseCurrentPagesTap_: function() { | 73 onUseCurrentPagesTap_: function() { |
| 71 this.browserProxy_.useCurrentPages(); | 74 this.browserProxy_.useCurrentPages(); |
| 72 }, | 75 }, |
| 73 }); | 76 }); |
| OLD | NEW |