| Index: chrome/browser/sessions/session_restore.cc
|
| ===================================================================
|
| --- chrome/browser/sessions/session_restore.cc (revision 150796)
|
| +++ chrome/browser/sessions/session_restore.cc (working copy)
|
| @@ -266,10 +266,10 @@
|
| max_parallel_tab_loads_ = tabs_loading_.size();
|
| tabs_to_load_.pop_front();
|
| tab->LoadIfNecessary();
|
| - content::WebContents* contents = tab->GetWebContents();
|
| - if (contents) {
|
| - Browser* browser = browser::FindBrowserWithWebContents(contents);
|
| - if (browser && chrome::GetActiveWebContents(browser) != contents) {
|
| + if (tab->GetWebContents()) {
|
| + int tab_index;
|
| + Browser* browser = browser::FindBrowserForController(tab, &tab_index);
|
| + if (browser && browser->active_index() != tab_index) {
|
| // 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.
|
| @@ -277,7 +277,7 @@
|
| // 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();
|
| + tab->GetWebContents()->WasHidden();
|
| }
|
| }
|
| }
|
|
|