Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(520)

Side by Side Diff: chrome/browser/resources/options/home_page_overlay.js

Issue 1919183005: Cleanup: Extract icon related methods outside of util.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename favicon.html to icon.html Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698