| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 const OptionsPage = options.OptionsPage; | 6 const OptionsPage = options.OptionsPage; |
| 7 const ArrayDataModel = cr.ui.ArrayDataModel; | 7 const ArrayDataModel = cr.ui.ArrayDataModel; |
| 8 const ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; | 8 const ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 /** | 105 /** |
| 106 * Sets the value of the input field to the given string. | 106 * Sets the value of the input field to the given string. |
| 107 * @private | 107 * @private |
| 108 * @param {string} url String value to set the input field to. | 108 * @param {string} url String value to set the input field to. |
| 109 */ | 109 */ |
| 110 setInputFieldValue_: function(url) { | 110 setInputFieldValue_: function(url) { |
| 111 $('addStartupPageURL').value = url; | 111 $('addStartupPageURL').value = url; |
| 112 this.updateAddButtonState_(); | 112 this.updateAddButtonState_(); |
| 113 }, | 113 }, |
| 114 |
| 115 /** @inheritDoc */ |
| 116 canShowPage: function() { |
| 117 return BrowserOptions.getInstance(). |
| 118 shouldEnableCustomStartupPageControls(); |
| 119 }, |
| 114 }; | 120 }; |
| 115 | 121 |
| 116 AddStartupPageOverlay.updateRecentPageList = function(pages) { | 122 AddStartupPageOverlay.updateRecentPageList = function(pages) { |
| 117 AddStartupPageOverlay.getInstance().updateRecentPageList_(pages); | 123 AddStartupPageOverlay.getInstance().updateRecentPageList_(pages); |
| 118 }; | 124 }; |
| 119 | 125 |
| 120 AddStartupPageOverlay.setInputFieldValue = function(url) { | 126 AddStartupPageOverlay.setInputFieldValue = function(url) { |
| 121 AddStartupPageOverlay.getInstance().setInputFieldValue_(url); | 127 AddStartupPageOverlay.getInstance().setInputFieldValue_(url); |
| 122 }; | 128 }; |
| 123 | 129 |
| 124 // Export | 130 // Export |
| 125 return { | 131 return { |
| 126 AddStartupPageOverlay: AddStartupPageOverlay | 132 AddStartupPageOverlay: AddStartupPageOverlay |
| 127 }; | 133 }; |
| 128 | 134 |
| 129 }); | 135 }); |
| OLD | NEW |