diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-24 02:47:58 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-24 02:47:58 +0000 |
commit | 505323e2bad435d4579cdd8c33b96c460816b97a (patch) | |
tree | 44c85b8af6f1e8c7a079d24ac38df19b4240e3ef /chrome/browser/tabs/tab_strip_model.h | |
parent | e993abfe81feaa374d476828a44942d296bdcc78 (diff) | |
download | chromium_src-505323e2bad435d4579cdd8c33b96c460816b97a.zip chromium_src-505323e2bad435d4579cdd8c33b96c460816b97a.tar.gz chromium_src-505323e2bad435d4579cdd8c33b96c460816b97a.tar.bz2 |
Two things:
- remove views dependencies from browser by moving profile related dialog actions into BrowserWindow.
- simplify the include dependencies in TabStripModel (making it easier to bring up on mac) by implementing more of its high level functionality in the delegate.
Review URL: http://codereview.chromium.org/18736
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8606 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tabs/tab_strip_model.h')
-rw-r--r-- | chrome/browser/tabs/tab_strip_model.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/chrome/browser/tabs/tab_strip_model.h b/chrome/browser/tabs/tab_strip_model.h index 0e5ceea..a9a6578 100644 --- a/chrome/browser/tabs/tab_strip_model.h +++ b/chrome/browser/tabs/tab_strip_model.h @@ -7,21 +7,19 @@ #include <vector> -#include "base/basictypes.h" #include "base/observer_list.h" -#include "chrome/browser/history/history.h" -#include "chrome/browser/tab_contents/site_instance.h" #include "chrome/common/notification_service.h" #include "chrome/common/page_transition_types.h" -#include "chrome/common/pref_member.h" namespace gfx { class Point; +class Rect; } class DockInfo; class GURL; class NavigationController; class Profile; +class SiteInstance; class TabContents; class TabStripModelOrderController; class TabStripModel; @@ -132,6 +130,17 @@ class TabStripModelDelegate { // Called when a drag session has completed and the frame that initiated the // the session should be closed. virtual void CloseFrameAfterDragSession() = 0; + + // Creates an entry in the historical tab database for the specified + // TabContents. + virtual void CreateHistoricalTab(TabContents* contents) = 0; + + // Runs any unload listeners associated with the specified TabContents before + // it is closed. If there are unload listeners that need to be run, this + // function returns true and the TabStripModel will wait before closing the + // TabContents. If it returns false, there are no unload listeners and the + // TabStripModel can close the TabContents immediately. + virtual bool RunUnloadListenerBeforeClosing(TabContents* contents) = 0; }; //////////////////////////////////////////////////////////////////////////////// @@ -286,10 +295,6 @@ class TabStripModel : public NotificationObserver { // Returns true if there are any TabContents that are currently loading. bool TabsAreLoading() const; - // Whether the tab has a beforeunload/unload listener that needs firing before - // being closed. - bool TabHasUnloadListener(int index); - // Returns the controller controller that opened the TabContents at |index|. NavigationController* GetOpenerOfTabContentsAt(int index); @@ -423,11 +428,6 @@ class TabStripModel : public NotificationObserver { // be |opener|'s NavigationController. void SetOpenerForContents(TabContents* contents, TabContents* opener); - // Returns true if closing the tab should add it to TabRestoreService. This - // returns true only if the profile has a TabRestoreService and the browser - // type is TABBED_BROWSER. - bool ShouldAddToTabRestoreService(TabContents* contents); - // Returns true if the tab represented by the specified data has an opener // that matches the specified one. If |use_group| is true, then this will // fall back to check the group relationship as well. |