| 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({ |
| 11 is: 'settings-startup-urls-page', | 11 is: 'settings-startup-urls-page', |
| 12 | 12 |
| 13 behaviors: [CrScrollableBehavior, WebUIListenerBehavior], | 13 behaviors: [CrScrollableBehavior, WebUIListenerBehavior], |
| 14 | 14 |
| 15 properties: { | 15 properties: { |
| 16 prefs: Object, | 16 prefs: Object, |
| 17 | 17 |
| 18 /** @type {settings.StartupUrlsPageBrowserProxy} */ | |
| 19 browserProxy_: Object, | |
| 20 | |
| 21 /** | 18 /** |
| 22 * Pages to load upon browser startup. | 19 * Pages to load upon browser startup. |
| 23 * @private {!Array<!StartupPageInfo>} | 20 * @private {!Array<!StartupPageInfo>} |
| 24 */ | 21 */ |
| 25 startupPages_: Array, | 22 startupPages_: Array, |
| 26 | 23 |
| 27 /** @private */ | 24 /** @private */ |
| 28 showStartupUrlDialog_: Boolean, | 25 showStartupUrlDialog_: Boolean, |
| 29 | 26 |
| 30 /** @private {?StartupPageInfo} */ | 27 /** @private {?StartupPageInfo} */ |
| 31 startupUrlDialogModel_: Object, | 28 startupUrlDialogModel_: Object, |
| 32 | 29 |
| 33 /** @private {Object}*/ | 30 /** @private {Object}*/ |
| 34 lastFocused_: Object, | 31 lastFocused_: Object, |
| 35 }, | 32 }, |
| 36 | 33 |
| 34 /** @private {?settings.StartupUrlsPageBrowserProxy} */ |
| 35 browserProxy_: null, |
| 36 |
| 37 /** | 37 /** |
| 38 * The element to return focus to, when the startup-url-dialog is closed. | 38 * The element to return focus to, when the startup-url-dialog is closed. |
| 39 * @private {?HTMLElement} | 39 * @private {?HTMLElement} |
| 40 */ | 40 */ |
| 41 startupUrlDialogAnchor_: null, | 41 startupUrlDialogAnchor_: null, |
| 42 | 42 |
| 43 /** @override */ | 43 /** @override */ |
| 44 attached: function() { | 44 attached: function() { |
| 45 this.browserProxy_ = settings.StartupUrlsPageBrowserProxyImpl.getInstance(); | 45 this.browserProxy_ = settings.StartupUrlsPageBrowserProxyImpl.getInstance(); |
| 46 this.addWebUIListener('update-startup-pages', function(startupPages) { | 46 this.addWebUIListener('update-startup-pages', function(startupPages) { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 this.startupUrlDialogAnchor_.focus(); | 80 this.startupUrlDialogAnchor_.focus(); |
| 81 this.startupUrlDialogAnchor_ = null; | 81 this.startupUrlDialogAnchor_ = null; |
| 82 } | 82 } |
| 83 }, | 83 }, |
| 84 | 84 |
| 85 /** @private */ | 85 /** @private */ |
| 86 onUseCurrentPagesTap_: function() { | 86 onUseCurrentPagesTap_: function() { |
| 87 this.browserProxy_.useCurrentPages(); | 87 this.browserProxy_.useCurrentPages(); |
| 88 }, | 88 }, |
| 89 }); | 89 }); |
| OLD | NEW |