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

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: rebase 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 43d76504e46e90369045e09c2bd889ba25ee280f..d25e8e92e1a2bba7eb5a35d545fdfa19c97e8ce8 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();
}
});
}
« no previous file with comments | « chrome/browser/resources/md_history/app.vulcanized.html ('k') | chrome/test/data/webui/md_history/history_toolbar_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698