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

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

Issue 1743143002: Remove WebContents::Was{Hidden,Shown}() from the content public interface Base URL: https://chromium.googlesource.com/chromium/src.git@20160225-WebContents-DicardCursorRects
Patch Set: Fix androido Created 4 years, 10 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_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index ff551e12b86ef59c226d6fce79a916aedca2e295..b8de0e38626db81b0e299152de97eca6a7bd7da4 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -188,8 +188,11 @@ WebContents* GetTabAndRevertIfNecessary(Browser* browser,
case NEW_FOREGROUND_TAB:
case NEW_BACKGROUND_TAB: {
WebContents* new_tab = current_tab->Clone();
- if (disposition == NEW_BACKGROUND_TAB)
- new_tab->WasHidden();
+ if (disposition == NEW_BACKGROUND_TAB) {
+ // TODO(tapted): WebContents::Clone() should be able to take a value for
+ // CreateParams::initially_hidden. Currently, it always uses |false|.
+ new_tab->MarkBackgrounded();
+ }
browser->tab_strip_model()->AddWebContents(
new_tab, -1, ui::PAGE_TRANSITION_LINK,
(disposition == NEW_FOREGROUND_TAB) ?

Powered by Google App Engine
This is Rietveld 408576698