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

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

Issue 3296003: FBTF: Move the TabRestoreService::Observer into its own file. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: More mac fixes Created 10 years, 4 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_types.cc ('k') | chrome/browser/sessions/tab_restore_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/tab_restore_service.h
diff --git a/chrome/browser/sessions/tab_restore_service.h b/chrome/browser/sessions/tab_restore_service.h
index e12b9d1fc974d875461bebf3c4c42983278234e2..2f9a237b00fd78ea3bf2272e86e8c6891f2f00b6 100644
--- a/chrome/browser/sessions/tab_restore_service.h
+++ b/chrome/browser/sessions/tab_restore_service.h
@@ -20,6 +20,7 @@ class Browser;
class NavigationController;
class Profile;
struct SessionWindow;
+class TabRestoreServiceObserver;
// TabRestoreService is responsible for maintaining the most recently closed
// tabs and windows. When a tab is closed
@@ -34,21 +35,6 @@ struct SessionWindow;
// add an observer.
class TabRestoreService : public BaseSessionService {
public:
- // Observer is notified when the set of entries managed by TabRestoreService
- // changes in some way.
- class Observer {
- public:
- // Sent when the set of entries changes in some way.
- virtual void TabRestoreServiceChanged(TabRestoreService* service) = 0;
-
- // Sent to all remaining Observers when TabRestoreService's
- // destructor is run.
- virtual void TabRestoreServiceDestroyed(TabRestoreService* service) = 0;
-
- protected:
- virtual ~Observer() {}
- };
-
// Interface used to allow the test to provide a custom time.
class TimeFactory {
public:
@@ -132,8 +118,8 @@ class TabRestoreService : public BaseSessionService {
// Adds/removes an observer. TabRestoreService does not take ownership of
// the observer.
- void AddObserver(Observer* observer);
- void RemoveObserver(Observer* observer);
+ void AddObserver(TabRestoreServiceObserver* observer);
+ void RemoveObserver(TabRestoreServiceObserver* observer);
// Creates a Tab to represent |tab| and notifies observers the list of
// entries has changed.
@@ -328,7 +314,7 @@ class TabRestoreService : public BaseSessionService {
// Number of entries we've written.
int entries_written_;
- ObserverList<Observer> observer_list_;
+ ObserverList<TabRestoreServiceObserver> observer_list_;
// Set of tabs that we've received a BrowserClosing method for but no
// corresponding BrowserClosed. We cache the set of browsers closing to
« no previous file with comments | « chrome/browser/sessions/session_types.cc ('k') | chrome/browser/sessions/tab_restore_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698