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

Unified Diff: chrome/browser/ui/browser_tabrestore.cc

Issue 1149263003: Add user_gesture param to BaseWindow::Activate Base URL: https://chromium.googlesource.com/chromium/src.git@ug2_WebContentsDelegate_ActivateContents
Patch Set: Update callers Created 5 years, 7 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/ui/browser_tabrestore.cc
diff --git a/chrome/browser/ui/browser_tabrestore.cc b/chrome/browser/ui/browser_tabrestore.cc
index a90291e8390495928e3bd1d028258f772ac28fe7..85e58182a24f7df61561ee049effe084688c9a17 100644
--- a/chrome/browser/ui/browser_tabrestore.cc
+++ b/chrome/browser/ui/browser_tabrestore.cc
@@ -120,7 +120,8 @@ content::WebContents* AddRestoredTab(
browser->tab_strip_model()->InsertWebContentsAt(tab_index, web_contents,
add_types);
if (select) {
- browser->window()->Activate();
+ // TODO(johnme): Can we sometimes be certain this was for a user gesture?
+ browser->window()->Activate(false /* user_gesture */);
} else {
// We set the size of the view here, before Blink does its initial layout.
// If we don't, the initial layout of background tabs will be performed

Powered by Google App Engine
This is Rietveld 408576698