OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 /** | 5 /** |
6 * @param {!Element} root | 6 * @param {!Element} root |
7 * @param {?Element} boundary | 7 * @param {?Element} boundary |
8 * @param {cr.ui.FocusRow.Delegate} delegate | 8 * @param {cr.ui.FocusRow.Delegate} delegate |
9 * @constructor | 9 * @constructor |
10 * @extends {cr.ui.FocusRow} | 10 * @extends {cr.ui.FocusRow} |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 * @param {string} historyDate Date of the current result. | 293 * @param {string} historyDate Date of the current result. |
294 * @param {string} search The search term associated with these results. | 294 * @param {string} search The search term associated with these results. |
295 * @return {string} The title for this history card. | 295 * @return {string} The title for this history card. |
296 * @private | 296 * @private |
297 */ | 297 */ |
298 cardTitle_: function(numberOfItems, historyDate, search) { | 298 cardTitle_: function(numberOfItems, historyDate, search) { |
299 if (!search) | 299 if (!search) |
300 return this.item.dateRelativeDay; | 300 return this.item.dateRelativeDay; |
301 return HistoryItem.searchResultsTitle(numberOfItems, search); | 301 return HistoryItem.searchResultsTitle(numberOfItems, search); |
302 }, | 302 }, |
| 303 |
| 304 /** @private */ |
| 305 addTimeTitle_: function() { |
| 306 var el = this.$['time-accessed']; |
| 307 el.setAttribute('title', new Date(this.item.time).toString()); |
| 308 this.unlisten(el, 'mouseover', 'addTimeTitle_'); |
| 309 }, |
303 }); | 310 }); |
304 | 311 |
305 /** | 312 /** |
306 * Check whether the time difference between the given history item and the | 313 * Check whether the time difference between the given history item and the |
307 * next one is large enough for a spacer to be required. | 314 * next one is large enough for a spacer to be required. |
308 * @param {Array<HistoryEntry>} visits | 315 * @param {Array<HistoryEntry>} visits |
309 * @param {number} currentIndex | 316 * @param {number} currentIndex |
310 * @param {string} searchedTerm | 317 * @param {string} searchedTerm |
311 * @return {boolean} Whether or not time gap separator is required. | 318 * @return {boolean} Whether or not time gap separator is required. |
312 */ | 319 */ |
(...skipping 17 matching lines...) Expand all Loading... |
330 * @return {string} The title for a page of search results. | 337 * @return {string} The title for a page of search results. |
331 */ | 338 */ |
332 HistoryItem.searchResultsTitle = function(numberOfResults, searchTerm) { | 339 HistoryItem.searchResultsTitle = function(numberOfResults, searchTerm) { |
333 var resultId = numberOfResults == 1 ? 'searchResult' : 'searchResults'; | 340 var resultId = numberOfResults == 1 ? 'searchResult' : 'searchResults'; |
334 return loadTimeData.getStringF('foundSearchResults', numberOfResults, | 341 return loadTimeData.getStringF('foundSearchResults', numberOfResults, |
335 loadTimeData.getString(resultId), searchTerm); | 342 loadTimeData.getString(resultId), searchTerm); |
336 }; | 343 }; |
337 | 344 |
338 return { HistoryItem: HistoryItem }; | 345 return { HistoryItem: HistoryItem }; |
339 }); | 346 }); |
OLD | NEW |