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

Unified Diff: chrome/browser/sessions/session_service.h

Issue 329040: Take 2 at this. The only change between this and the first is to add the GetT... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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
« no previous file with comments | « chrome/browser/sessions/session_restore_uitest.cc ('k') | chrome/browser/sessions/session_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_service.h
===================================================================
--- chrome/browser/sessions/session_service.h (revision 30237)
+++ chrome/browser/sessions/session_service.h (working copy)
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "chrome/browser/browser.h"
+#include "chrome/browser/defaults.h"
#include "chrome/browser/sessions/base_session_service.h"
#include "chrome/browser/sessions/session_id.h"
#include "chrome/common/notification_observer.h"
@@ -304,16 +305,19 @@
// our profile.
bool IsOnlyOneTabLeft();
- // Returns true if there are no open tabbed browser windows with our profile,
- // or the only tabbed browser open has a session id of window_id.
- bool HasOpenTabbedBrowsers(const SessionID& window_id);
+ // Returns true if there are open trackable browser windows whose ids do
+ // match |window_id| with our profile. A trackable window is a window from
+ // which |should_track_changes_for_browser_type| returns true. See
+ // |should_track_changes_for_browser_type| for details.
+ bool HasOpenTrackableBrowsers(const SessionID& window_id);
// Returns true if changes to tabs in the specified window should be tracked.
bool ShouldTrackChangesToWindow(const SessionID& window_id);
// Returns true if we track changes to the specified browser type.
static bool should_track_changes_for_browser_type(Browser::Type type) {
- return type == Browser::TYPE_NORMAL;
+ return type == Browser::TYPE_NORMAL ||
+ (type == Browser::TYPE_POPUP && browser_defaults::kRestorePopups);
}
NotificationRegistrar registrar_;
@@ -347,11 +351,11 @@
typedef std::set<SessionID::id_type> WindowsTracking;
WindowsTracking windows_tracking_;
- // Are there any open open tabbed browsers?
- bool has_open_tabbed_browsers_;
+ // Are there any open trackable browsers?
+ bool has_open_trackable_browsers_;
// If true and a new tabbed browser is created and there are no opened tabbed
- // browser (has_open_tabbed_browsers_ is false), then the current session
+ // browser (has_open_trackable_browsers_ is false), then the current session
// is made the previous session. See description above class for details on
// current/previou session.
bool move_on_new_browser_;
« no previous file with comments | « chrome/browser/sessions/session_restore_uitest.cc ('k') | chrome/browser/sessions/session_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698