| Index: chrome/browser/sessions/tab_loader.cc
|
| diff --git a/chrome/browser/sessions/tab_loader.cc b/chrome/browser/sessions/tab_loader.cc
|
| index 676db802f58f34533763271946b0b924b2d9d58c..bbcc670eb08c103dc039037262ea4e4f84f5edc0 100644
|
| --- a/chrome/browser/sessions/tab_loader.cc
|
| +++ b/chrome/browser/sessions/tab_loader.cc
|
| @@ -174,17 +174,12 @@ void TabLoader::LoadNextTab() {
|
| content::WebContents* contents = controller->GetWebContents();
|
| if (contents) {
|
| Browser* browser = chrome::FindBrowserWithWebContents(contents);
|
| - if (browser &&
|
| - browser->tab_strip_model()->GetActiveWebContents() != contents) {
|
| - // By default tabs are marked as visible. As only the active tab is
|
| - // visible we need to explicitly tell non-active tabs they are hidden.
|
| - // Without this call non-active tabs are not marked as backgrounded.
|
| - //
|
| - // NOTE: We need to do this here rather than when the tab is added to
|
| - // the Browser as at that time not everything has been created, so that
|
| - // the call would do nothing.
|
| - contents->WasHidden();
|
| - }
|
| + bool is_active = browser &&
|
| + browser->tab_strip_model()->GetActiveWebContents() == contents;
|
| +
|
| + // Background tabs should have been loaded with WebContents::CreateParams
|
| + // initially_hidden = true. Ensure this is reflected in the tab status.
|
| + DCHECK_EQ(is_active, contents->GetRenderWidgetHostView()->IsShowing());
|
| }
|
| }
|
|
|
|
|