OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 // Returns the width for touch tabs. | 152 // Returns the width for touch tabs. |
153 static int GetTouchWidth(); | 153 static int GetTouchWidth(); |
154 | 154 |
155 // Returns the width for pinned tabs. Pinned tabs always have this width. | 155 // Returns the width for pinned tabs. Pinned tabs always have this width. |
156 static int GetPinnedWidth(); | 156 static int GetPinnedWidth(); |
157 | 157 |
158 // Returns the height for immersive mode tabs. | 158 // Returns the height for immersive mode tabs. |
159 static int GetImmersiveHeight(); | 159 static int GetImmersiveHeight(); |
160 | 160 |
161 // Returns the Y inset within the tab bounds for drawing the background image. | |
162 // This is necessary for correct vertical alignment of the frame, tab, and | |
163 // toolbar images with custom themes. | |
164 static int GetYInsetForActiveTabBackground(); | |
165 | |
166 // Returns the inverse of the slope of the diagonal portion of the tab outer | 161 // Returns the inverse of the slope of the diagonal portion of the tab outer |
167 // border. (This is a positive value, so it's specifically for the slope of | 162 // border. (This is a positive value, so it's specifically for the slope of |
168 // the leading edge.) | 163 // the leading edge.) |
169 // | 164 // |
170 // This returns the inverse (dx/dy instead of dy/dx) because we use exact | 165 // This returns the inverse (dx/dy instead of dy/dx) because we use exact |
171 // values for the vertical distances between points and then compute the | 166 // values for the vertical distances between points and then compute the |
172 // horizontal deltas from those. | 167 // horizontal deltas from those. |
173 static float GetInverseDiagonalSlope(); | 168 static float GetInverseDiagonalSlope(); |
174 | 169 |
175 private: | 170 private: |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 | 359 |
365 // The favicon for the tab. This might be the sad tab icon or a copy of | 360 // The favicon for the tab. This might be the sad tab icon or a copy of |
366 // data().favicon and may be modified for theming. It is created on demand | 361 // data().favicon and may be modified for theming. It is created on demand |
367 // and thus may be null. | 362 // and thus may be null. |
368 gfx::ImageSkia favicon_; | 363 gfx::ImageSkia favicon_; |
369 | 364 |
370 DISALLOW_COPY_AND_ASSIGN(Tab); | 365 DISALLOW_COPY_AND_ASSIGN(Tab); |
371 }; | 366 }; |
372 | 367 |
373 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 368 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
OLD | NEW |