| 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 /** @const */ var MAX_SEARCH_DEPTH_MONTHS = 18; | 10 /** @const */ var MAX_SEARCH_DEPTH_MONTHS = 18; |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 if (i < content.length) | 212 if (i < content.length) |
| 213 node.appendChild(document.createTextNode(content.slice(i))); | 213 node.appendChild(document.createTextNode(content.slice(i))); |
| 214 }; | 214 }; |
| 215 | 215 |
| 216 /** | 216 /** |
| 217 * @return {DOMObject} DOM representation for the title block. | 217 * @return {DOMObject} DOM representation for the title block. |
| 218 * @private | 218 * @private |
| 219 */ | 219 */ |
| 220 Visit.prototype.getTitleDOM_ = function() { | 220 Visit.prototype.getTitleDOM_ = function() { |
| 221 var node = createElementWithClassName('div', 'title'); | 221 var node = createElementWithClassName('div', 'title'); |
| 222 node.style.backgroundImage = | 222 node.style.backgroundImage = url(getFaviconURL(encodeURIForCSS(this.url_))); |
| 223 'url(chrome://favicon/' + encodeURIForCSS(this.url_) + ')'; | 223 node.style.backgroundSize = '16px'; |
| 224 | 224 |
| 225 var link = document.createElement('a'); | 225 var link = document.createElement('a'); |
| 226 link.href = this.url_; | 226 link.href = this.url_; |
| 227 link.id = 'id-' + this.id_; | 227 link.id = 'id-' + this.id_; |
| 228 link.target = '_top'; | 228 link.target = '_top'; |
| 229 | 229 |
| 230 // Add a tooltip, since it might be ellipsized. | 230 // Add a tooltip, since it might be ellipsized. |
| 231 // TODO(dubroy): Find a way to show the tooltip only when necessary. | 231 // TODO(dubroy): Find a way to show the tooltip only when necessary. |
| 232 link.title = this.title_; | 232 link.title = this.title_; |
| 233 | 233 |
| (...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1167 historyView.reload(); | 1167 historyView.reload(); |
| 1168 } | 1168 } |
| 1169 | 1169 |
| 1170 // Add handlers to HTML elements. | 1170 // Add handlers to HTML elements. |
| 1171 document.addEventListener('DOMContentLoaded', load); | 1171 document.addEventListener('DOMContentLoaded', load); |
| 1172 | 1172 |
| 1173 // This event lets us enable and disable menu items before the menu is shown. | 1173 // This event lets us enable and disable menu items before the menu is shown. |
| 1174 document.addEventListener('canExecute', function(e) { | 1174 document.addEventListener('canExecute', function(e) { |
| 1175 e.canExecute = true; | 1175 e.canExecute = true; |
| 1176 }); | 1176 }); |
| OLD | NEW |