| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 */ var Page = cr.ui.pageManager.Page; | 6 /** @const */ var Page = cr.ui.pageManager.Page; |
| 7 /** @const */ var SettingsDialog = options.SettingsDialog; | 7 /** @const */ var SettingsDialog = options.SettingsDialog; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * HomePageOverlay class | 10 * HomePageOverlay class |
| 11 * Dialog that allows users to set the home page. | 11 * Dialog that allows users to set the home page. |
| 12 * @constructor | 12 * @constructor |
| 13 * @extends {options.SettingsDialog} | 13 * @extends {options.SettingsDialog} |
| 14 */ | 14 */ |
| 15 function HomePageOverlay() { | 15 function HomePageOverlay() { |
| 16 SettingsDialog.call(this, 'homePageOverlay', | 16 SettingsDialog.call(this, 'homePageOverlay', |
| 17 loadTimeData.getString('homePageOverlayTabTitle'), | 17 loadTimeData.getString('homePageOverlayTabTitle'), |
| 18 'home-page-overlay', | 18 'home-page-overlay', |
| 19 $('home-page-confirm'), $('home-page-cancel')); | 19 assertInstanceof($('home-page-confirm'), HTMLInputElement), |
| 20 assertInstanceof($('home-page-cancel'), HTMLInputElement)); |
| 20 } | 21 } |
| 21 | 22 |
| 22 cr.addSingletonGetter(HomePageOverlay); | 23 cr.addSingletonGetter(HomePageOverlay); |
| 23 | 24 |
| 24 HomePageOverlay.prototype = { | 25 HomePageOverlay.prototype = { |
| 25 __proto__: SettingsDialog.prototype, | 26 __proto__: SettingsDialog.prototype, |
| 26 | 27 |
| 27 /** | 28 /** |
| 28 * An autocomplete list that can be attached to the home page URL field. | 29 * An autocomplete list that can be attached to the home page URL field. |
| 29 * @type {cr.ui.AutocompleteList} | 30 * @type {cr.ui.AutocompleteList} |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 HomePageOverlay.updateAutocompleteSuggestions = function() { | 145 HomePageOverlay.updateAutocompleteSuggestions = function() { |
| 145 var instance = HomePageOverlay.getInstance(); | 146 var instance = HomePageOverlay.getInstance(); |
| 146 instance.updateAutocompleteSuggestions_.apply(instance, arguments); | 147 instance.updateAutocompleteSuggestions_.apply(instance, arguments); |
| 147 }; | 148 }; |
| 148 | 149 |
| 149 // Export | 150 // Export |
| 150 return { | 151 return { |
| 151 HomePageOverlay: HomePageOverlay | 152 HomePageOverlay: HomePageOverlay |
| 152 }; | 153 }; |
| 153 }); | 154 }); |
| OLD | NEW |