| 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( |
| 17 loadTimeData.getString('homePageOverlayTabTitle'), | 17 this, 'homePageOverlay', |
| 18 'home-page-overlay', | 18 loadTimeData.getString('homePageOverlayTabTitle'), 'home-page-overlay', |
| 19 assertInstanceof($('home-page-confirm'), HTMLButtonElement), | 19 assertInstanceof($('home-page-confirm'), HTMLButtonElement), |
| 20 assertInstanceof($('home-page-cancel'), HTMLButtonElement)); | 20 assertInstanceof($('home-page-cancel'), HTMLButtonElement)); |
| 21 } | 21 } |
| 22 | 22 |
| 23 cr.addSingletonGetter(HomePageOverlay); | 23 cr.addSingletonGetter(HomePageOverlay); |
| 24 | 24 |
| 25 HomePageOverlay.prototype = { | 25 HomePageOverlay.prototype = { |
| 26 __proto__: SettingsDialog.prototype, | 26 __proto__: SettingsDialog.prototype, |
| 27 | 27 |
| 28 /** | 28 /** |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 SettingsDialog.prototype.handleConfirm.call(this); | 141 SettingsDialog.prototype.handleConfirm.call(this); |
| 142 }, | 142 }, |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 HomePageOverlay.updateAutocompleteSuggestions = function() { | 145 HomePageOverlay.updateAutocompleteSuggestions = function() { |
| 146 var instance = HomePageOverlay.getInstance(); | 146 var instance = HomePageOverlay.getInstance(); |
| 147 instance.updateAutocompleteSuggestions_.apply(instance, arguments); | 147 instance.updateAutocompleteSuggestions_.apply(instance, arguments); |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 // Export | 150 // Export |
| 151 return { | 151 return {HomePageOverlay: HomePageOverlay}; |
| 152 HomePageOverlay: HomePageOverlay | |
| 153 }; | |
| 154 }); | 152 }); |
| OLD | NEW |