From 7a16aeeb28850afdf5d512cc2e4bb2e58f4b1c10 Mon Sep 17 00:00:00 2001 From: "ben@chromium.org" Date: Tue, 18 Nov 2008 02:00:53 +0000 Subject: Last couple of bits of new-frame related cleanup: - Remove frame_util.cc, moving functions to BrowserList (endsession) and BrowserView (GetBrowserWindowForHWND) - Tidy up interface for TabIconView model. The model now sources only the information it needs (loading state and favicon). - Replace BrowserType class with an enum on Browser. http://crbug.com/2320 http://crbug.com/3363 Review URL: http://codereview.chromium.org/10786 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5596 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/session_restore.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'chrome/browser/session_restore.cc') diff --git a/chrome/browser/session_restore.cc b/chrome/browser/session_restore.cc index b8ec569..258ed7c 100644 --- a/chrome/browser/session_restore.cc +++ b/chrome/browser/session_restore.cc @@ -12,6 +12,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/navigation_controller.h" #include "chrome/browser/profile.h" +#include "chrome/browser/session_service.h" #include "chrome/browser/tab_contents.h" #include "chrome/common/notification_registrar.h" #include "chrome/common/notification_service.h" @@ -286,14 +287,14 @@ class SessionRestoreImpl : public NotificationObserver { for (std::vector::iterator i = windows->begin(); i != windows->end(); ++i) { Browser* browser = NULL; - if (!has_tabbed_browser && (*i)->type == BrowserType::TABBED_BROWSER) + if (!has_tabbed_browser && (*i)->type == Browser::TYPE_NORMAL) has_tabbed_browser = true; - if (i == windows->begin() && (*i)->type == BrowserType::TABBED_BROWSER && + if (i == windows->begin() && (*i)->type == Browser::TYPE_NORMAL && !clobber_existing_window_) { // If there is an open tabbed browser window, use it. Otherwise fall // through and create a new one. browser = current_browser; - if (browser && (browser->type() != BrowserType::TABBED_BROWSER || + if (browser && (browser->type() != Browser::TYPE_NORMAL || browser->profile()->IsOffTheRecord())) { browser = NULL; } @@ -304,7 +305,7 @@ class SessionRestoreImpl : public NotificationObserver { browser->set_override_maximized((*i)->is_maximized); browser->CreateBrowserWindow(); } - if ((*i)->type == BrowserType::TABBED_BROWSER) + if ((*i)->type == Browser::TYPE_NORMAL) last_browser = browser; const int initial_tab_count = browser->tab_count(); RestoreTabsToBrowser(*(*i), browser); @@ -316,7 +317,7 @@ class SessionRestoreImpl : public NotificationObserver { // included at least one tabbed browser, then close the browser window // that was opened when the user clicked to restore the session. if (clobber_existing_window_ && current_browser && has_tabbed_browser && - current_browser->type() == BrowserType::TABBED_BROWSER) { + current_browser->type() == Browser::TYPE_NORMAL) { current_browser->CloseAllTabs(); } if (last_browser && !urls_to_open_.empty()) -- cgit v1.1