| 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 TabContents; | 8 class TabContents; |
| 9 class TabStripModel; | 9 class TabStripModel; |
| 10 class TabStripSelectionModel; | 10 class TabStripSelectionModel; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // the index of |new_contents|. |user_gesture| specifies whether or not this | 71 // the index of |new_contents|. |user_gesture| specifies whether or not this |
| 72 // was done by a user input event (e.g. clicking on a tab, keystroke) or as a | 72 // was done by a user input event (e.g. clicking on a tab, keystroke) or as a |
| 73 // side-effect of some other function. | 73 // side-effect of some other function. |
| 74 // Note: It is possible for the selection to change while the active tab | 74 // Note: It is possible for the selection to change while the active tab |
| 75 // remains unchanged. For example, control-click may not change the active tab | 75 // remains unchanged. For example, control-click may not change the active tab |
| 76 // but does change the selection. In this case |ActiveTabChanged| is not sent. | 76 // but does change the selection. In this case |ActiveTabChanged| is not sent. |
| 77 // If you care about any changes to the selection, override | 77 // If you care about any changes to the selection, override |
| 78 // TabSelectionChanged. | 78 // TabSelectionChanged. |
| 79 // Note: |old_contents| will be NULL if there was no contents previously | 79 // Note: |old_contents| will be NULL if there was no contents previously |
| 80 // active. | 80 // active. |
| 81 virtual void ActiveTabChanged(TabContents* old_contents, | 81 virtual void ActiveTabChanged(content::WebContents* old_contents, |
| 82 TabContents* new_contents, | 82 content::WebContents* new_contents, |
| 83 int index, | 83 int index, |
| 84 bool user_gesture); | 84 bool user_gesture); |
| 85 | 85 |
| 86 // Sent when the selection changes in |tab_strip_model|. More precisely when | 86 // Sent when the selection changes in |tab_strip_model|. More precisely when |
| 87 // selected tabs, anchor tab or active tab change. |old_model| is a snapshot | 87 // selected tabs, anchor tab or active tab change. |old_model| is a snapshot |
| 88 // of the selection model before the change. See also ActiveTabChanged for | 88 // of the selection model before the change. See also ActiveTabChanged for |
| 89 // details. | 89 // details. |
| 90 virtual void TabSelectionChanged(TabStripModel* tab_strip_model, | 90 virtual void TabSelectionChanged(TabStripModel* tab_strip_model, |
| 91 const TabStripSelectionModel& old_model); | 91 const TabStripSelectionModel& old_model); |
| 92 | 92 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 // Sent when the tabstrip model is about to be deleted and any reference held | 136 // Sent when the tabstrip model is about to be deleted and any reference held |
| 137 // must be dropped. | 137 // must be dropped. |
| 138 virtual void TabStripModelDeleted(); | 138 virtual void TabStripModelDeleted(); |
| 139 | 139 |
| 140 protected: | 140 protected: |
| 141 virtual ~TabStripModelObserver() {} | 141 virtual ~TabStripModelObserver() {} |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_OBSERVER_H_ | 144 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_OBSERVER_H_ |
| OLD | NEW |