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 OptionsPage = options.OptionsPage; | 6 /** @const */ var OptionsPage = options.OptionsPage; |
7 /** @const */ var SettingsDialog = options.SettingsDialog; | 7 /** @const */ var SettingsDialog = options.SettingsDialog; |
8 | 8 |
9 /** | 9 /** |
10 * HomePageOverlay class | 10 * HomePageOverlay class |
(...skipping 12 matching lines...) Expand all Loading... |
23 HomePageOverlay.prototype = { | 23 HomePageOverlay.prototype = { |
24 __proto__: SettingsDialog.prototype, | 24 __proto__: SettingsDialog.prototype, |
25 | 25 |
26 /** | 26 /** |
27 * An autocomplete list that can be attached to the home page URL field. | 27 * An autocomplete list that can be attached to the home page URL field. |
28 * @type {cr.ui.AutocompleteList} | 28 * @type {cr.ui.AutocompleteList} |
29 * @private | 29 * @private |
30 */ | 30 */ |
31 autocompleteList_: null, | 31 autocompleteList_: null, |
32 | 32 |
33 /** | 33 /** @override */ |
34 * Initialize the page. | |
35 */ | |
36 initializePage: function() { | 34 initializePage: function() { |
37 // Call base class implementation to start preference initialization. | 35 // Call base class implementation to start preference initialization. |
38 SettingsDialog.prototype.initializePage.call(this); | 36 SettingsDialog.prototype.initializePage.call(this); |
39 | 37 |
40 var self = this; | 38 var self = this; |
41 options.Preferences.getInstance().addEventListener( | 39 options.Preferences.getInstance().addEventListener( |
42 'homepage_is_newtabpage', | 40 'homepage_is_newtabpage', |
43 this.handleHomepageIsNTPPrefChange.bind(this)); | 41 this.handleHomepageIsNTPPrefChange.bind(this)); |
44 | 42 |
45 var urlField = $('homepage-url-field'); | 43 var urlField = $('homepage-url-field'); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 HomePageOverlay.updateAutocompleteSuggestions = function() { | 144 HomePageOverlay.updateAutocompleteSuggestions = function() { |
147 var instance = HomePageOverlay.getInstance(); | 145 var instance = HomePageOverlay.getInstance(); |
148 instance.updateAutocompleteSuggestions_.apply(instance, arguments); | 146 instance.updateAutocompleteSuggestions_.apply(instance, arguments); |
149 }; | 147 }; |
150 | 148 |
151 // Export | 149 // Export |
152 return { | 150 return { |
153 HomePageOverlay: HomePageOverlay | 151 HomePageOverlay: HomePageOverlay |
154 }; | 152 }; |
155 }); | 153 }); |
OLD | NEW |