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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 } | 281 } |
282 | 282 |
283 // Recalculates the correct |button_color_| and resets the title, media | 283 // Recalculates the correct |button_color_| and resets the title, media |
284 // indicator, and close button colors if necessary. This should be called any | 284 // indicator, and close button colors if necessary. This should be called any |
285 // time the theme or active state may have changed. | 285 // time the theme or active state may have changed. |
286 void OnButtonColorMaybeChanged(); | 286 void OnButtonColorMaybeChanged(); |
287 | 287 |
288 // Schedules repaint task for icon. | 288 // Schedules repaint task for icon. |
289 void ScheduleIconPaint(); | 289 void ScheduleIconPaint(); |
290 | 290 |
291 // Returns the rect that can be used for content inside the tab borders. | |
292 gfx::Rect GetInteriorBounds() const; | |
293 | |
294 // Returns the rectangle for the light bar in immersive mode. | 291 // Returns the rectangle for the light bar in immersive mode. |
295 gfx::Rect GetImmersiveBarRect() const; | 292 gfx::Rect GetImmersiveBarRect() const; |
296 | 293 |
297 // Gets the tab id and frame id. | 294 // Gets the tab id and frame id. |
298 void GetTabIdAndFrameId(views::Widget* widget, | 295 void GetTabIdAndFrameId(views::Widget* widget, |
299 int* tab_id, | 296 int* tab_id, |
300 int* frame_id) const; | 297 int* frame_id) const; |
301 | 298 |
302 // Performs a one-time initialization of static resources such as tab images. | 299 // Performs a one-time initialization of static resources such as tab images. |
303 static void InitTabResources(); | 300 static void InitTabResources(); |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 SkColor button_color_; | 396 SkColor button_color_; |
400 | 397 |
401 // As the majority of the tabs are inactive, and painting tabs is slowish, | 398 // As the majority of the tabs are inactive, and painting tabs is slowish, |
402 // we cache a handful of the inactive tab backgrounds here. | 399 // we cache a handful of the inactive tab backgrounds here. |
403 static ImageCache* image_cache_; | 400 static ImageCache* image_cache_; |
404 | 401 |
405 DISALLOW_COPY_AND_ASSIGN(Tab); | 402 DISALLOW_COPY_AND_ASSIGN(Tab); |
406 }; | 403 }; |
407 | 404 |
408 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 405 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
OLD | NEW |