| 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 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 urlFieldIndicator.readOnly = event.value.value; | 85 urlFieldIndicator.readOnly = event.value.value; |
| 86 }, | 86 }, |
| 87 | 87 |
| 88 /** | 88 /** |
| 89 * Updates the background of the url field to show the favicon for the | 89 * Updates the background of the url field to show the favicon for the |
| 90 * URL that is currently typed in. | 90 * URL that is currently typed in. |
| 91 * @private | 91 * @private |
| 92 */ | 92 */ |
| 93 updateFavicon_: function() { | 93 updateFavicon_: function() { |
| 94 var urlField = $('homepage-url-field'); | 94 var urlField = $('homepage-url-field'); |
| 95 urlField.style.backgroundImage = getFaviconImageSet(urlField.value); | 95 urlField.style.backgroundImage = cr.icon.getFaviconImageSet( |
| 96 urlField.value); |
| 96 }, | 97 }, |
| 97 | 98 |
| 98 /** | 99 /** |
| 99 * Sends an asynchronous request for new autocompletion suggestions for the | 100 * Sends an asynchronous request for new autocompletion suggestions for the |
| 100 * the given query. When new suggestions are available, the C++ handler will | 101 * the given query. When new suggestions are available, the C++ handler will |
| 101 * call updateAutocompleteSuggestions_. | 102 * call updateAutocompleteSuggestions_. |
| 102 * @param {string} query List of autocomplete suggestions. | 103 * @param {string} query List of autocomplete suggestions. |
| 103 * @private | 104 * @private |
| 104 */ | 105 */ |
| 105 requestAutocompleteSuggestions_: function(query) { | 106 requestAutocompleteSuggestions_: function(query) { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 HomePageOverlay.updateAutocompleteSuggestions = function() { | 146 HomePageOverlay.updateAutocompleteSuggestions = function() { |
| 146 var instance = HomePageOverlay.getInstance(); | 147 var instance = HomePageOverlay.getInstance(); |
| 147 instance.updateAutocompleteSuggestions_.apply(instance, arguments); | 148 instance.updateAutocompleteSuggestions_.apply(instance, arguments); |
| 148 }; | 149 }; |
| 149 | 150 |
| 150 // Export | 151 // Export |
| 151 return { | 152 return { |
| 152 HomePageOverlay: HomePageOverlay | 153 HomePageOverlay: HomePageOverlay |
| 153 }; | 154 }; |
| 154 }); | 155 }); |
| OLD | NEW |