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

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

Issue 2280853002: Slightly nicer icon.js APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 = cr.icon.getFaviconImageSet( 95 urlField.style.backgroundImage = cr.icon.getFavicon(urlField.value);
96 urlField.value);
97 }, 96 },
98 97
99 /** 98 /**
100 * Sends an asynchronous request for new autocompletion suggestions for the 99 * Sends an asynchronous request for new autocompletion suggestions for the
101 * the given query. When new suggestions are available, the C++ handler will 100 * the given query. When new suggestions are available, the C++ handler will
102 * call updateAutocompleteSuggestions_. 101 * call updateAutocompleteSuggestions_.
103 * @param {string} query List of autocomplete suggestions. 102 * @param {string} query List of autocomplete suggestions.
104 * @private 103 * @private
105 */ 104 */
106 requestAutocompleteSuggestions_: function(query) { 105 requestAutocompleteSuggestions_: function(query) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 HomePageOverlay.updateAutocompleteSuggestions = function() { 145 HomePageOverlay.updateAutocompleteSuggestions = function() {
147 var instance = HomePageOverlay.getInstance(); 146 var instance = HomePageOverlay.getInstance();
148 instance.updateAutocompleteSuggestions_.apply(instance, arguments); 147 instance.updateAutocompleteSuggestions_.apply(instance, arguments);
149 }; 148 };
150 149
151 // Export 150 // Export
152 return { 151 return {
153 HomePageOverlay: HomePageOverlay 152 HomePageOverlay: HomePageOverlay
154 }; 153 };
155 }); 154 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698