| 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 22 matching lines...) Expand all Loading... |
| 33 class TabStripModelObserver { | 33 class TabStripModelObserver { |
| 34 public: | 34 public: |
| 35 // Enumeration of the possible values supplied to TabChangedAt. | 35 // Enumeration of the possible values supplied to TabChangedAt. |
| 36 enum TabChangeType { | 36 enum TabChangeType { |
| 37 // Only the loading state changed. | 37 // Only the loading state changed. |
| 38 LOADING_ONLY, | 38 LOADING_ONLY, |
| 39 | 39 |
| 40 // Only the title changed and page isn't loading. | 40 // Only the title changed and page isn't loading. |
| 41 TITLE_NOT_LOADING, | 41 TITLE_NOT_LOADING, |
| 42 | 42 |
| 43 // Change not characterized by LOADING_ONLY or TITLE_NOT_LOADING. | 43 // Only the url changed and loading state isn't changed. |
| 44 URL_CHANGING_ONLY, |
| 45 |
| 46 // Change not characterized by LOADING_ONLY, TITLE_NOT_LOADING or |
| 47 // URL_CHANGING_ONLY. |
| 44 ALL | 48 ALL |
| 45 }; | 49 }; |
| 46 | 50 |
| 47 enum ChangeReason { | 51 enum ChangeReason { |
| 48 // Used to indicate that none of the reasons below are responsible for the | 52 // Used to indicate that none of the reasons below are responsible for the |
| 49 // active tab change. | 53 // active tab change. |
| 50 CHANGE_REASON_NONE = 0, | 54 CHANGE_REASON_NONE = 0, |
| 51 // The active tab changed because the tab's web contents was replaced. | 55 // The active tab changed because the tab's web contents was replaced. |
| 52 CHANGE_REASON_REPLACED = 1 << 0, | 56 CHANGE_REASON_REPLACED = 1 << 0, |
| 53 // The active tab changed due to a user input event. | 57 // The active tab changed due to a user input event. |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 152 |
| 149 // Sent when the tabstrip model is about to be deleted and any reference held | 153 // Sent when the tabstrip model is about to be deleted and any reference held |
| 150 // must be dropped. | 154 // must be dropped. |
| 151 virtual void TabStripModelDeleted(); | 155 virtual void TabStripModelDeleted(); |
| 152 | 156 |
| 153 protected: | 157 protected: |
| 154 virtual ~TabStripModelObserver() {} | 158 virtual ~TabStripModelObserver() {} |
| 155 }; | 159 }; |
| 156 | 160 |
| 157 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_OBSERVER_H_ | 161 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_OBSERVER_H_ |
| OLD | NEW |