| 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 <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 // Returns the width for touch tabs. | 148 // Returns the width for touch tabs. |
| 149 static int GetTouchWidth(); | 149 static int GetTouchWidth(); |
| 150 | 150 |
| 151 // Returns the width for pinned tabs. Pinned tabs always have this width. | 151 // Returns the width for pinned tabs. Pinned tabs always have this width. |
| 152 static int GetPinnedWidth(); | 152 static int GetPinnedWidth(); |
| 153 | 153 |
| 154 // Returns the height for immersive mode tabs. | 154 // Returns the height for immersive mode tabs. |
| 155 static int GetImmersiveHeight(); | 155 static int GetImmersiveHeight(); |
| 156 | 156 |
| 157 // Returns the Y offset within the tab background image to begin drawing at |
| 158 // the top of the active tab bounds. This is a negative value, which will |
| 159 // result in the top of the tab background image being drawn below the top of |
| 160 // the tab. None of this offset area is actually visible. |
| 161 // |
| 162 // This is necessary for correct vertical alignment of the frame, tab, and |
| 163 // toolbar images with custom themes. |
| 164 static int GetYOffsetForActiveTabBackground(); |
| 165 |
| 157 private: | 166 private: |
| 158 friend class TabTest; | 167 friend class TabTest; |
| 159 FRIEND_TEST_ALL_PREFIXES(TabTest, CloseButtonLayout); | 168 FRIEND_TEST_ALL_PREFIXES(TabTest, CloseButtonLayout); |
| 160 | 169 |
| 161 friend class TabStripTest; | 170 friend class TabStripTest; |
| 162 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabHitTestMaskWhenStacked); | 171 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabHitTestMaskWhenStacked); |
| 163 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabCloseButtonVisibilityWhenStacked); | 172 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabCloseButtonVisibilityWhenStacked); |
| 164 | 173 |
| 165 // The animation object used to swap the favicon with the sad tab icon. | 174 // The animation object used to swap the favicon with the sad tab icon. |
| 166 class FaviconCrashAnimation; | 175 class FaviconCrashAnimation; |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 SkColor button_color_; | 407 SkColor button_color_; |
| 399 | 408 |
| 400 // As the majority of the tabs are inactive, and painting tabs is slowish, | 409 // As the majority of the tabs are inactive, and painting tabs is slowish, |
| 401 // we cache a handful of the inactive tab backgrounds here. | 410 // we cache a handful of the inactive tab backgrounds here. |
| 402 static ImageCache* image_cache_; | 411 static ImageCache* image_cache_; |
| 403 | 412 |
| 404 DISALLOW_COPY_AND_ASSIGN(Tab); | 413 DISALLOW_COPY_AND_ASSIGN(Tab); |
| 405 }; | 414 }; |
| 406 | 415 |
| 407 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 416 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
| OLD | NEW |