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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
187 // code and is not a general-purpose method. | 187 // code and is not a general-purpose method. |
188 void RemoveAndDeleteTab(BaseTab* tab); | 188 void RemoveAndDeleteTab(BaseTab* tab); |
189 | 189 |
190 // Resets the bounds of all non-closing tabs. | 190 // Resets the bounds of all non-closing tabs. |
191 virtual void GenerateIdealBounds() = 0; | 191 virtual void GenerateIdealBounds() = 0; |
192 | 192 |
193 void set_ideal_bounds(int index, const gfx::Rect& bounds) { | 193 void set_ideal_bounds(int index, const gfx::Rect& bounds) { |
194 tab_data_[index].ideal_bounds = bounds; | 194 tab_data_[index].ideal_bounds = bounds; |
195 } | 195 } |
196 | 196 |
197 // Update the lengths of common title prefixes for all tabs. This needs | |
198 // to be done every time tabs are added/removed or when titles change. | |
199 virtual void UpdateCommonTitlePrefix(); | |
sky
2011/02/25 17:02:07
Why is this virtual?
Also, this class is only use
sky
2011/02/25 17:03:03
One additional comment. Don't take my comment to m
MAD
2011/02/25 20:09:13
Good point... I looked for a test infrastructure f
| |
200 | |
197 // Returns the index into |tab_data_| corresponding to the specified tab, or | 201 // Returns the index into |tab_data_| corresponding to the specified tab, or |
198 // -1 if the tab isn't in |tab_data_|. | 202 // -1 if the tab isn't in |tab_data_|. |
199 int TabIndexOfTab(BaseTab* tab) const; | 203 int TabIndexOfTab(BaseTab* tab) const; |
200 | 204 |
201 // Stops any ongoing animations. If |layout| is true and an animation is | 205 // Stops any ongoing animations. If |layout| is true and an animation is |
202 // ongoing this does a layout. | 206 // ongoing this does a layout. |
203 virtual void StopAnimating(bool layout); | 207 virtual void StopAnimating(bool layout); |
204 | 208 |
205 // Destroys the active drag controller. | 209 // Destroys the active drag controller. |
206 void DestroyDragController(); | 210 void DestroyDragController(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
246 // model. | 250 // model. |
247 bool attaching_dragged_tab_; | 251 bool attaching_dragged_tab_; |
248 | 252 |
249 views::BoundsAnimator bounds_animator_; | 253 views::BoundsAnimator bounds_animator_; |
250 | 254 |
251 // Size we last layed out at. | 255 // Size we last layed out at. |
252 gfx::Size last_layout_size_; | 256 gfx::Size last_layout_size_; |
253 }; | 257 }; |
254 | 258 |
255 #endif // CHROME_BROWSER_UI_VIEWS_TABS_BASE_TAB_STRIP_H_ | 259 #endif // CHROME_BROWSER_UI_VIEWS_TABS_BASE_TAB_STRIP_H_ |
OLD | NEW |