| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_VIEWS_TABS_BASE_TAB_STRIP_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_BASE_TAB_STRIP_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TABS_BASE_TAB_STRIP_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_BASE_TAB_STRIP_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 // code and is not a general-purpose method. | 184 // code and is not a general-purpose method. |
| 185 void RemoveAndDeleteTab(BaseTab* tab); | 185 void RemoveAndDeleteTab(BaseTab* tab); |
| 186 | 186 |
| 187 // Resets the bounds of all non-closing tabs. | 187 // Resets the bounds of all non-closing tabs. |
| 188 virtual void GenerateIdealBounds() = 0; | 188 virtual void GenerateIdealBounds() = 0; |
| 189 | 189 |
| 190 void set_ideal_bounds(int index, const gfx::Rect& bounds) { | 190 void set_ideal_bounds(int index, const gfx::Rect& bounds) { |
| 191 tab_data_[index].ideal_bounds = bounds; | 191 tab_data_[index].ideal_bounds = bounds; |
| 192 } | 192 } |
| 193 | 193 |
| 194 // Update the lengths of common title prefixes for all tabs. This needs |
| 195 // to be done every time tabs are added/removed or when titles change. |
| 196 virtual void UpdateCommonTitlePrefix(); |
| 197 |
| 194 // Returns the index into |tab_data_| corresponding to the specified tab, or | 198 // Returns the index into |tab_data_| corresponding to the specified tab, or |
| 195 // -1 if the tab isn't in |tab_data_|. | 199 // -1 if the tab isn't in |tab_data_|. |
| 196 int TabIndexOfTab(BaseTab* tab) const; | 200 int TabIndexOfTab(BaseTab* tab) const; |
| 197 | 201 |
| 198 // Stops any ongoing animations. If |layout| is true and an animation is | 202 // Stops any ongoing animations. If |layout| is true and an animation is |
| 199 // ongoing this does a layout. | 203 // ongoing this does a layout. |
| 200 virtual void StopAnimating(bool layout); | 204 virtual void StopAnimating(bool layout); |
| 201 | 205 |
| 202 // Destroys the active drag controller. | 206 // Destroys the active drag controller. |
| 203 void DestroyDragController(); | 207 void DestroyDragController(); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 // model. | 247 // model. |
| 244 bool attaching_dragged_tab_; | 248 bool attaching_dragged_tab_; |
| 245 | 249 |
| 246 views::BoundsAnimator bounds_animator_; | 250 views::BoundsAnimator bounds_animator_; |
| 247 | 251 |
| 248 // Size we last layed out at. | 252 // Size we last layed out at. |
| 249 gfx::Size last_layout_size_; | 253 gfx::Size last_layout_size_; |
| 250 }; | 254 }; |
| 251 | 255 |
| 252 #endif // CHROME_BROWSER_UI_VIEWS_TABS_BASE_TAB_STRIP_H_ | 256 #endif // CHROME_BROWSER_UI_VIEWS_TABS_BASE_TAB_STRIP_H_ |
| OLD | NEW |