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_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_OBSERVER_H_ |
6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_OBSERVER_H_ | 6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_OBSERVER_H_ |
7 | 7 |
8 class TabStripModel; | 8 class TabStripModel; |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 // The specified WebContents at |index| is being closed (and eventually | 64 // The specified WebContents at |index| is being closed (and eventually |
65 // destroyed). |tab_strip_model| is the TabStripModel that contained the tab. | 65 // destroyed). |tab_strip_model| is the TabStripModel that contained the tab. |
66 virtual void TabClosingAt(TabStripModel* tab_strip_model, | 66 virtual void TabClosingAt(TabStripModel* tab_strip_model, |
67 content::WebContents* contents, | 67 content::WebContents* contents, |
68 int index); | 68 int index); |
69 | 69 |
70 // The specified WebContents at |index| is being detached, perhaps to | 70 // The specified WebContents at |index| is being detached, perhaps to |
71 // be inserted in another TabStripModel. The implementer should take whatever | 71 // be inserted in another TabStripModel. The implementer should take whatever |
72 // action is necessary to deal with the WebContents no longer being | 72 // action is necessary to deal with the WebContents no longer being |
73 // present. | 73 // present. |
74 virtual void TabDetachedAt(content::WebContents* contents, int index); | 74 virtual void TabDetachedAt(content::WebContents* contents, |
75 int index, | |
76 bool closing_all); | |
Avi (use Gerrit)
2013/06/19 14:18:34
What does "closing_all" mean in this context? This
| |
75 | 77 |
76 // The active WebContents is about to change from |old_contents|. | 78 // The active WebContents is about to change from |old_contents|. |
77 // This gives observers a chance to prepare for an impending switch before it | 79 // This gives observers a chance to prepare for an impending switch before it |
78 // happens. | 80 // happens. |
79 virtual void TabDeactivated(content::WebContents* contents); | 81 virtual void TabDeactivated(content::WebContents* contents); |
80 | 82 |
81 // Sent when the active tab changes. The previously active tab is identified | 83 // Sent when the active tab changes. The previously active tab is identified |
82 // by |old_contents| and the newly active tab by |new_contents|. |index| is | 84 // by |old_contents| and the newly active tab by |new_contents|. |index| is |
83 // the index of |new_contents|. If |reason| has CHANGE_REASON_REPLACED set | 85 // the index of |new_contents|. If |reason| has CHANGE_REASON_REPLACED set |
84 // then the web contents was replaced (see TabChangedAt). If |reason| has | 86 // then the web contents was replaced (see TabChangedAt). If |reason| has |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
148 | 150 |
149 // Sent when the tabstrip model is about to be deleted and any reference held | 151 // Sent when the tabstrip model is about to be deleted and any reference held |
150 // must be dropped. | 152 // must be dropped. |
151 virtual void TabStripModelDeleted(); | 153 virtual void TabStripModelDeleted(); |
152 | 154 |
153 protected: | 155 protected: |
154 virtual ~TabStripModelObserver() {} | 156 virtual ~TabStripModelObserver() {} |
155 }; | 157 }; |
156 | 158 |
157 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_OBSERVER_H_ | 159 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_OBSERVER_H_ |
OLD | NEW |