Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: chrome/browser/ui/views/tabs/tab.h

Issue 1424913008: Combine tab background image getter code into one place. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@combine_tab_drawing
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698