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

Unified Diff: chrome/browser/resources/md_history/history.js

Issue 2237703004: [MD History] Focus the search bar on load. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_history/history.js
diff --git a/chrome/browser/resources/md_history/history.js b/chrome/browser/resources/md_history/history.js
index 4cce580cc9e8ccc0e21f3930cb76b28bed560a43..ed2a0dc0e892c44fb34e544573a35d2281c0eac8 100644
--- a/chrome/browser/resources/md_history/history.js
+++ b/chrome/browser/resources/md_history/history.js
@@ -38,19 +38,13 @@ function waitForAppUpgrade() {
*/
function historyResult(info, results) {
waitForAppUpgrade().then(function() {
- /** @type {HistoryAppElement} */($('history-app'))
- .historyResult(info, results);
+ var app = /** @type {HistoryAppElement} */($('history-app'));
+ app.historyResult(info, results);
document.body.classList.remove('loading');
if (!resultsRendered) {
resultsRendered = true;
- // requestAnimationFrame allows measurement immediately before the next
- // repaint, but after the first page of <iron-list> items has stamped.
- requestAnimationFrame(function() {
- chrome.send(
- 'metricsHandler:recordTime',
- ['History.ResultsRenderedTime', window.performance.now()]);
- });
+ app.onFirstRender();
}
});
}

Powered by Google App Engine
This is Rietveld 408576698