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_TAB_STRIP_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/ref_counted.h" | 9 #include "base/ref_counted.h" |
10 #include "base/timer.h" | 10 #include "base/timer.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 // Returns the image to use for indicating a drop on a tab. If is_down is | 202 // Returns the image to use for indicating a drop on a tab. If is_down is |
203 // true, this returns an arrow pointing down. | 203 // true, this returns an arrow pointing down. |
204 static SkBitmap* GetDropArrowImage(bool is_down); | 204 static SkBitmap* GetDropArrowImage(bool is_down); |
205 | 205 |
206 // -- Animations ------------------------------------------------------------ | 206 // -- Animations ------------------------------------------------------------ |
207 | 207 |
208 // Generates the ideal bounds of the TabStrip when all Tabs have finished | 208 // Generates the ideal bounds of the TabStrip when all Tabs have finished |
209 // animating to their desired position/bounds. This is used by the standard | 209 // animating to their desired position/bounds. This is used by the standard |
210 // Layout method and other callers like the DraggedTabController that need | 210 // Layout method and other callers like the DraggedTabController that need |
211 // stable representations of Tab positions. | 211 // stable representations of Tab positions. |
212 void GenerateIdealBounds(); | 212 virtual void GenerateIdealBounds(); |
213 | 213 |
214 // Starts various types of TabStrip animations. | 214 // Starts various types of TabStrip animations. |
215 void StartResizeLayoutAnimation(); | 215 void StartResizeLayoutAnimation(); |
216 void StartMoveTabAnimation(int from_model_index, | 216 void StartMoveTabAnimation(int from_model_index, |
217 int to_model_index); | 217 int to_model_index); |
218 void StartMiniTabAnimation(); | 218 virtual void StartMiniTabAnimation(); |
219 void StartMouseInitiatedRemoveTabAnimation(int model_index); | 219 void StartMouseInitiatedRemoveTabAnimation(int model_index); |
220 | 220 |
221 // Calculates the available width for tabs, assuming a Tab is to be closed. | 221 // Calculates the available width for tabs, assuming a Tab is to be closed. |
222 int GetAvailableWidthForTabs(Tab* last_tab) const; | 222 int GetAvailableWidthForTabs(Tab* last_tab) const; |
223 | 223 |
224 // Returns true if the specified point in TabStrip coords is within the | 224 // Returns true if the specified point in TabStrip coords is within the |
225 // hit-test region of the specified Tab. | 225 // hit-test region of the specified Tab. |
226 bool IsPointInTab(Tab* tab, const gfx::Point& point_in_tabstrip_coords); | 226 bool IsPointInTab(Tab* tab, const gfx::Point& point_in_tabstrip_coords); |
227 | 227 |
228 // -- Member Variables ------------------------------------------------------ | 228 // -- Member Variables ------------------------------------------------------ |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 | 269 |
270 // Used for stage 1 of new tab animation. | 270 // Used for stage 1 of new tab animation. |
271 base::OneShotTimer<TabStrip> new_tab_timer_; | 271 base::OneShotTimer<TabStrip> new_tab_timer_; |
272 | 272 |
273 scoped_ptr<views::MouseWatcher> mouse_watcher_; | 273 scoped_ptr<views::MouseWatcher> mouse_watcher_; |
274 | 274 |
275 DISALLOW_COPY_AND_ASSIGN(TabStrip); | 275 DISALLOW_COPY_AND_ASSIGN(TabStrip); |
276 }; | 276 }; |
277 | 277 |
278 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ | 278 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ |
OLD | NEW |