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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 // Calculates the bounds needed for each of the tabs, placing the result in | 194 // Calculates the bounds needed for each of the tabs, placing the result in |
195 // |bounds|. | 195 // |bounds|. |
196 virtual void CalculateBoundsForDraggedTabs( | 196 virtual void CalculateBoundsForDraggedTabs( |
197 const std::vector<BaseTab*>& tabs, | 197 const std::vector<BaseTab*>& tabs, |
198 std::vector<gfx::Rect>* bounds) = 0; | 198 std::vector<gfx::Rect>* bounds) = 0; |
199 | 199 |
200 void set_ideal_bounds(int index, const gfx::Rect& bounds) { | 200 void set_ideal_bounds(int index, const gfx::Rect& bounds) { |
201 tab_data_[index].ideal_bounds = bounds; | 201 tab_data_[index].ideal_bounds = bounds; |
202 } | 202 } |
203 | 203 |
204 // Identifies whether we should ignore title prefix eliding or not | |
205 // for the specified tab. This allows derived class like the one | |
206 // for side tabs to make a different choice (e.g., for mini tabs). | |
207 virtual bool IgnoreTitlePrefixEliding(BaseTab* tab); | |
208 | |
209 // Update the lengths of common title prefixes for all tabs. This needs | |
210 // to be done every time tabs are added/removed or when titles change. | |
211 virtual void UpdateCommonTitlePrefix(); | |
212 | |
213 // Returns the index into |tab_data_| corresponding to the specified tab, or | 204 // Returns the index into |tab_data_| corresponding to the specified tab, or |
214 // -1 if the tab isn't in |tab_data_|. | 205 // -1 if the tab isn't in |tab_data_|. |
215 int TabIndexOfTab(BaseTab* tab) const; | 206 int TabIndexOfTab(BaseTab* tab) const; |
216 | 207 |
217 // Stops any ongoing animations. If |layout| is true and an animation is | 208 // Stops any ongoing animations. If |layout| is true and an animation is |
218 // ongoing this does a layout. | 209 // ongoing this does a layout. |
219 virtual void StopAnimating(bool layout); | 210 virtual void StopAnimating(bool layout); |
220 | 211 |
221 // Destroys the active drag controller. | 212 // Destroys the active drag controller. |
222 void DestroyDragController(); | 213 void DestroyDragController(); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 // model. | 268 // model. |
278 bool attaching_dragged_tab_; | 269 bool attaching_dragged_tab_; |
279 | 270 |
280 views::BoundsAnimator bounds_animator_; | 271 views::BoundsAnimator bounds_animator_; |
281 | 272 |
282 // Size we last layed out at. | 273 // Size we last layed out at. |
283 gfx::Size last_layout_size_; | 274 gfx::Size last_layout_size_; |
284 }; | 275 }; |
285 | 276 |
286 #endif // CHROME_BROWSER_UI_VIEWS_TABS_BASE_TAB_STRIP_H_ | 277 #endif // CHROME_BROWSER_UI_VIEWS_TABS_BASE_TAB_STRIP_H_ |
OLD | NEW |