summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sessions
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/sessions')
-rw-r--r--chrome/browser/sessions/tab_restore_service_delegate.h5
-rw-r--r--chrome/browser/sessions/tab_restore_service_helper.cc6
2 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/sessions/tab_restore_service_delegate.h b/chrome/browser/sessions/tab_restore_service_delegate.h
index 96d9ec56..f00c8c0 100644
--- a/chrome/browser/sessions/tab_restore_service_delegate.h
+++ b/chrome/browser/sessions/tab_restore_service_delegate.h
@@ -75,8 +75,11 @@ class TabRestoreServiceDelegate {
const content::WebContents* contents);
// see chrome::FindBrowserWithID
+ // Returns the TabRestoreServiceDelegate of the Browser with |desired_id| if
+ // such a Browser exists and is on the desktop defined by |host_desktop_type|.
static TabRestoreServiceDelegate* FindDelegateWithID(
- SessionID::id_type desired_id);
+ SessionID::id_type desired_id,
+ chrome::HostDesktopType host_desktop_type);
protected:
virtual ~TabRestoreServiceDelegate() {}
diff --git a/chrome/browser/sessions/tab_restore_service_helper.cc b/chrome/browser/sessions/tab_restore_service_helper.cc
index 78e7857..7eb99741 100644
--- a/chrome/browser/sessions/tab_restore_service_helper.cc
+++ b/chrome/browser/sessions/tab_restore_service_helper.cc
@@ -435,8 +435,10 @@ TabRestoreServiceDelegate* TabRestoreServiceHelper::RestoreTab(
tab.user_agent_override);
} else {
// We only respsect the tab's original browser if there's no disposition.
- if (disposition == UNKNOWN && tab.has_browser())
- delegate = TabRestoreServiceDelegate::FindDelegateWithID(tab.browser_id);
+ if (disposition == UNKNOWN && tab.has_browser()) {
+ delegate = TabRestoreServiceDelegate::FindDelegateWithID(
+ tab.browser_id, host_desktop_type);
+ }
int tab_index = -1;