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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 // indicator, and close button colors if necessary. This should be called any | 291 // indicator, and close button colors if necessary. This should be called any |
292 // time the theme or active state may have changed. | 292 // time the theme or active state may have changed. |
293 void OnButtonColorMaybeChanged(); | 293 void OnButtonColorMaybeChanged(); |
294 | 294 |
295 // Schedules repaint task for icon. | 295 // Schedules repaint task for icon. |
296 void ScheduleIconPaint(); | 296 void ScheduleIconPaint(); |
297 | 297 |
298 // Returns the rectangle for the light bar in immersive mode. | 298 // Returns the rectangle for the light bar in immersive mode. |
299 gfx::Rect GetImmersiveBarRect() const; | 299 gfx::Rect GetImmersiveBarRect() const; |
300 | 300 |
301 // Gets the tab id and frame id. | |
302 void GetTabIdAndFrameId(views::Widget* widget, | |
303 int* tab_id, | |
304 int* frame_id) const; | |
305 | |
306 // Performs a one-time initialization of static resources such as tab images. | 301 // Performs a one-time initialization of static resources such as tab images. |
307 static void InitTabResources(); | 302 static void InitTabResources(); |
308 | 303 |
309 // Loads the images to be used for the tab background. | 304 // Loads the images to be used for the tab background. |
310 static void LoadTabImages(); | 305 static void LoadTabImages(); |
311 | 306 |
312 // Returns the cached image for the specified arguments, or an empty image if | 307 // Returns the cached image for the specified arguments, or an empty image if |
313 // there isn't one cached. | 308 // there isn't one cached. |
314 static gfx::ImageSkia GetCachedImage(int resource_id, | 309 static gfx::ImageSkia GetCachedImage(int resource_id, |
315 const gfx::Size& size, | 310 const gfx::Size& size, |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 SkColor button_color_; | 398 SkColor button_color_; |
404 | 399 |
405 // As the majority of the tabs are inactive, and painting tabs is slowish, | 400 // As the majority of the tabs are inactive, and painting tabs is slowish, |
406 // we cache a handful of the inactive tab backgrounds here. | 401 // we cache a handful of the inactive tab backgrounds here. |
407 static ImageCache* image_cache_; | 402 static ImageCache* image_cache_; |
408 | 403 |
409 DISALLOW_COPY_AND_ASSIGN(Tab); | 404 DISALLOW_COPY_AND_ASSIGN(Tab); |
410 }; | 405 }; |
411 | 406 |
412 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 407 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
OLD | NEW |