OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_DELEGATE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "content/public/common/page_transition_types.h" | 10 #include "content/public/common/page_transition_types.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 virtual void CreateHistoricalTab(content::WebContents* contents) = 0; | 97 virtual void CreateHistoricalTab(content::WebContents* contents) = 0; |
98 | 98 |
99 // Runs any unload listeners associated with the specified WebContents | 99 // Runs any unload listeners associated with the specified WebContents |
100 // before it is closed. If there are unload listeners that need to be run, | 100 // before it is closed. If there are unload listeners that need to be run, |
101 // this function returns true and the TabStripModel will wait before closing | 101 // this function returns true and the TabStripModel will wait before closing |
102 // the WebContents. If it returns false, there are no unload listeners | 102 // the WebContents. If it returns false, there are no unload listeners |
103 // and the TabStripModel will close the WebContents immediately. | 103 // and the TabStripModel will close the WebContents immediately. |
104 virtual bool RunUnloadListenerBeforeClosing( | 104 virtual bool RunUnloadListenerBeforeClosing( |
105 content::WebContents* contents) = 0; | 105 content::WebContents* contents) = 0; |
106 | 106 |
| 107 // Returns true if we should run unload listeners before attempts |
| 108 // to close |contents|. |
| 109 virtual bool ShouldRunUnloadListenerBeforeClosing( |
| 110 content::WebContents* contents) = 0; |
| 111 |
107 // Returns the current tab restore type. | 112 // Returns the current tab restore type. |
108 virtual RestoreTabType GetRestoreTabType() = 0; | 113 virtual RestoreTabType GetRestoreTabType() = 0; |
109 | 114 |
110 // Restores the last closed tab unless tab restore type is none. | 115 // Restores the last closed tab unless tab restore type is none. |
111 virtual void RestoreTab() = 0; | 116 virtual void RestoreTab() = 0; |
112 | 117 |
113 // Returns true if we should allow "bookmark all tabs" in this window; this is | 118 // Returns true if we should allow "bookmark all tabs" in this window; this is |
114 // true when there is more than one bookmarkable tab open. | 119 // true when there is more than one bookmarkable tab open. |
115 virtual bool CanBookmarkAllTabs() const = 0; | 120 virtual bool CanBookmarkAllTabs() const = 0; |
116 | 121 |
117 // Creates a bookmark folder containing a bookmark for all open tabs. | 122 // Creates a bookmark folder containing a bookmark for all open tabs. |
118 virtual void BookmarkAllTabs() = 0; | 123 virtual void BookmarkAllTabs() = 0; |
119 }; | 124 }; |
120 | 125 |
121 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_DELEGATE_H_ | 126 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_DELEGATE_H_ |
OLD | NEW |