| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 if (this.startupUrlDialogAnchor_) { | 79 if (this.startupUrlDialogAnchor_) { |
| 80 cr.ui.focusWithoutInk(assert(this.startupUrlDialogAnchor_)); | 80 cr.ui.focusWithoutInk(assert(this.startupUrlDialogAnchor_)); |
| 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 |
| 90 /** |
| 91 * @return {boolean} Whether "Add new page" and "Use current pages" are |
| 92 * allowed. |
| 93 * @private |
| 94 */ |
| 95 shouldAllowUrlsEdit_: function() { |
| 96 return this.get('prefs.session.startup_urls.enforcement') != |
| 97 chrome.settingsPrivate.Enforcement.ENFORCED; |
| 98 }, |
| 89 }); | 99 }); |
| OLD | NEW |