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

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

Issue 1414203012: Combine active and inactive tab background drawing functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@combine_radial_gradients
Patch Set: Compile fix for realz 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // Paint with the normal tab style. 232 // Paint with the normal tab style.
233 void PaintTab(gfx::Canvas* canvas); 233 void PaintTab(gfx::Canvas* canvas);
234 234
235 // Paint with the "immersive mode" light-bar style. 235 // Paint with the "immersive mode" light-bar style.
236 void PaintImmersiveTab(gfx::Canvas* canvas); 236 void PaintImmersiveTab(gfx::Canvas* canvas);
237 237
238 // Paint various portions of the Tab 238 // Paint various portions of the Tab
239 void PaintTabBackground(gfx::Canvas* canvas); 239 void PaintTabBackground(gfx::Canvas* canvas);
240 void PaintInactiveTabBackgroundWithTitleChange(gfx::Canvas* canvas); 240 void PaintInactiveTabBackgroundWithTitleChange(gfx::Canvas* canvas);
241 void PaintInactiveTabBackground(gfx::Canvas* canvas); 241 void PaintInactiveTabBackground(gfx::Canvas* canvas);
242 void PaintInactiveTabBackgroundUsingResourceId(gfx::Canvas* canvas, 242 void PaintTabBackgroundUsingFillId(gfx::Canvas* canvas,
243 int tab_id); 243 bool is_active,
244 void PaintActiveTabBackground(gfx::Canvas* canvas); 244 int fill_id,
245 bool has_custom_image,
246 int y_offset);
247 void PaintTabFill(gfx::Canvas* canvas,
248 gfx::ImageSkia* fill_image,
249 int x_offset,
250 int y_offset,
251 bool is_active);
245 252
246 // Paints the favicon, mirrored for RTL if needed. 253 // Paints the favicon, mirrored for RTL if needed.
247 void PaintIcon(gfx::Canvas* canvas); 254 void PaintIcon(gfx::Canvas* canvas);
248 255
249 // Invoked if data_.network_state changes, or the network_state is not none. 256 // Invoked if data_.network_state changes, or the network_state is not none.
250 void AdvanceLoadingAnimation(TabRendererData::NetworkState old_state, 257 void AdvanceLoadingAnimation(TabRendererData::NetworkState old_state,
251 TabRendererData::NetworkState state); 258 TabRendererData::NetworkState state);
252 259
253 // Returns the number of favicon-size elements that can fit in the tab's 260 // Returns the number of favicon-size elements that can fit in the tab's
254 // current size. 261 // current size.
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 SkColor button_color_; 403 SkColor button_color_;
397 404
398 // As the majority of the tabs are inactive, and painting tabs is slowish, 405 // As the majority of the tabs are inactive, and painting tabs is slowish,
399 // we cache a handful of the inactive tab backgrounds here. 406 // we cache a handful of the inactive tab backgrounds here.
400 static ImageCache* image_cache_; 407 static ImageCache* image_cache_;
401 408
402 DISALLOW_COPY_AND_ASSIGN(Tab); 409 DISALLOW_COPY_AND_ASSIGN(Tab);
403 }; 410 };
404 411
405 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 412 #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