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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 protected: | 149 protected: |
150 // The Tabs we contain, and their last generated "good" bounds. | 150 // The Tabs we contain, and their last generated "good" bounds. |
151 struct TabData { | 151 struct TabData { |
152 BaseTab* tab; | 152 BaseTab* tab; |
153 gfx::Rect ideal_bounds; | 153 gfx::Rect ideal_bounds; |
154 }; | 154 }; |
155 | 155 |
156 // View overrides. | 156 // View overrides. |
157 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; | 157 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; |
158 virtual void OnMouseReleased(const views::MouseEvent& event, | 158 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
159 bool canceled) OVERRIDE; | 159 virtual void OnMouseCaptureLost() OVERRIDE; |
160 | 160 |
161 // Creates and returns a new tab. The caller owners the returned tab. | 161 // Creates and returns a new tab. The caller owners the returned tab. |
162 virtual BaseTab* CreateTab() = 0; | 162 virtual BaseTab* CreateTab() = 0; |
163 | 163 |
164 // Invoked from |AddTabAt| after the newly created tab has been inserted. | 164 // Invoked from |AddTabAt| after the newly created tab has been inserted. |
165 // Subclasses should either start an animation, or layout. | 165 // Subclasses should either start an animation, or layout. |
166 virtual void StartInsertTabAnimation(int model_index) = 0; | 166 virtual void StartInsertTabAnimation(int model_index) = 0; |
167 | 167 |
168 // Invoked from |MoveTab| after |tab_data_| has been updated to animate the | 168 // Invoked from |MoveTab| after |tab_data_| has been updated to animate the |
169 // move. | 169 // move. |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 // model. | 271 // model. |
272 bool attaching_dragged_tab_; | 272 bool attaching_dragged_tab_; |
273 | 273 |
274 views::BoundsAnimator bounds_animator_; | 274 views::BoundsAnimator bounds_animator_; |
275 | 275 |
276 // Size we last layed out at. | 276 // Size we last layed out at. |
277 gfx::Size last_layout_size_; | 277 gfx::Size last_layout_size_; |
278 }; | 278 }; |
279 | 279 |
280 #endif // CHROME_BROWSER_UI_VIEWS_TABS_BASE_TAB_STRIP_H_ | 280 #endif // CHROME_BROWSER_UI_VIEWS_TABS_BASE_TAB_STRIP_H_ |
OLD | NEW |