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 <include src="../uber/uber_utils.js"> | 5 <include src="../uber/uber_utils.js"> |
6 | 6 |
7 /////////////////////////////////////////////////////////////////////////////// | 7 /////////////////////////////////////////////////////////////////////////////// |
8 // Globals: | 8 // Globals: |
9 /** @const */ var RESULTS_PER_PAGE = 150; | 9 /** @const */ var RESULTS_PER_PAGE = 150; |
10 | 10 |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 if (i < content.length) | 189 if (i < content.length) |
190 node.appendChild(document.createTextNode(content.slice(i))); | 190 node.appendChild(document.createTextNode(content.slice(i))); |
191 }; | 191 }; |
192 | 192 |
193 /** | 193 /** |
194 * @return {DOMObject} DOM representation for the title block. | 194 * @return {DOMObject} DOM representation for the title block. |
195 * @private | 195 * @private |
196 */ | 196 */ |
197 Visit.prototype.getTitleDOM_ = function() { | 197 Visit.prototype.getTitleDOM_ = function() { |
198 var node = createElementWithClassName('div', 'title'); | 198 var node = createElementWithClassName('div', 'title'); |
199 node.style.backgroundImage = url(getFaviconUrl(this.url_)); | 199 node.style.backgroundImage = getFaviconImageSet(this.url_); |
200 node.style.backgroundSize = '16px'; | 200 node.style.backgroundSize = '16px'; |
201 | 201 |
202 var link = document.createElement('a'); | 202 var link = document.createElement('a'); |
203 link.href = this.url_; | 203 link.href = this.url_; |
204 link.id = 'id-' + this.id_; | 204 link.id = 'id-' + this.id_; |
205 link.target = '_top'; | 205 link.target = '_top'; |
206 | 206 |
207 // Add a tooltip, since it might be ellipsized. | 207 // Add a tooltip, since it might be ellipsized. |
208 // TODO(dubroy): Find a way to show the tooltip only when necessary. | 208 // TODO(dubroy): Find a way to show the tooltip only when necessary. |
209 link.title = this.title_; | 209 link.title = this.title_; |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 historyView.reload(); | 1079 historyView.reload(); |
1080 } | 1080 } |
1081 | 1081 |
1082 // Add handlers to HTML elements. | 1082 // Add handlers to HTML elements. |
1083 document.addEventListener('DOMContentLoaded', load); | 1083 document.addEventListener('DOMContentLoaded', load); |
1084 | 1084 |
1085 // This event lets us enable and disable menu items before the menu is shown. | 1085 // This event lets us enable and disable menu items before the menu is shown. |
1086 document.addEventListener('canExecute', function(e) { | 1086 document.addEventListener('canExecute', function(e) { |
1087 e.canExecute = true; | 1087 e.canExecute = true; |
1088 }); | 1088 }); |
OLD | NEW |