Chromium Code Reviews| 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 <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 226 // Invoked from SetData after |data_| has been updated to the new data. | 226 // Invoked from SetData after |data_| has been updated to the new data. |
| 227 void DataChanged(const TabRendererData& old); | 227 void DataChanged(const TabRendererData& old); |
| 228 | 228 |
| 229 // Paint with the normal tab style. If |clip| is non-empty, the tab border | 229 // Paint with the normal tab style. If |clip| is non-empty, the tab border |
| 230 // should be clipped against it. | 230 // should be clipped against it. |
| 231 void PaintTab(gfx::Canvas* canvas, const gfx::Path& clip); | 231 void PaintTab(gfx::Canvas* canvas, const gfx::Path& clip); |
| 232 | 232 |
| 233 // Paint with the "immersive mode" light-bar style. | 233 // Paint with the "immersive mode" light-bar style. |
| 234 void PaintImmersiveTab(gfx::Canvas* canvas); | 234 void PaintImmersiveTab(gfx::Canvas* canvas); |
| 235 | 235 |
| 236 // Paint various portions of the Tab. | 236 // Paint the background of an inactive tab. |
|
Peter Kasting
2016/10/21 21:07:51
Nit: Paints
(Bonus if you also fix the other func
Evan Stade
2016/10/21 22:11:12
Done.
| |
| 237 void PaintInactiveTabBackground(gfx::Canvas* canvas, const gfx::Path& clip); | 237 void PaintInactiveTabBackground(gfx::Canvas* canvas, const gfx::Path& clip); |
| 238 | |
| 239 // Paints a tab background using the image defined by |fill_id| at the | |
| 240 // provided offset. If |fill_id| is 0, it will fall back to using the solid | |
| 241 // color defined by the theme provider and ignore the offset. | |
| 238 void PaintTabBackgroundUsingFillId(gfx::Canvas* fill_canvas, | 242 void PaintTabBackgroundUsingFillId(gfx::Canvas* fill_canvas, |
| 239 gfx::Canvas* stroke_canvas, | 243 gfx::Canvas* stroke_canvas, |
| 240 bool is_active, | 244 bool is_active, |
| 241 int fill_id, | 245 int fill_id, |
| 242 bool has_custom_image, | |
| 243 int y_offset); | 246 int y_offset); |
| 244 | 247 |
| 245 // Paints the pinned tab title changed indicator and |favicon_|. |favicon_| | 248 // Paints the pinned tab title changed indicator and |favicon_|. |favicon_| |
| 246 // may be null. |favicon_draw_bounds| is |favicon_bounds_| adjusted for rtl | 249 // may be null. |favicon_draw_bounds| is |favicon_bounds_| adjusted for rtl |
| 247 // and clipped to the bounds of the tab. | 250 // and clipped to the bounds of the tab. |
| 248 void PaintPinnedTabTitleChangedIndicatorAndIcon( | 251 void PaintPinnedTabTitleChangedIndicatorAndIcon( |
| 249 gfx::Canvas* canvas, | 252 gfx::Canvas* canvas, |
| 250 const gfx::Rect& favicon_draw_bounds); | 253 const gfx::Rect& favicon_draw_bounds); |
| 251 | 254 |
| 252 // Paints the favicon, mirrored for RTL if needed. | 255 // Paints the favicon, mirrored for RTL if needed. |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 359 | 362 |
| 360 // The favicon for the tab. This might be the sad tab icon or a copy of | 363 // The favicon for the tab. This might be the sad tab icon or a copy of |
| 361 // data().favicon and may be modified for theming. It is created on demand | 364 // data().favicon and may be modified for theming. It is created on demand |
| 362 // and thus may be null. | 365 // and thus may be null. |
| 363 gfx::ImageSkia favicon_; | 366 gfx::ImageSkia favicon_; |
| 364 | 367 |
| 365 DISALLOW_COPY_AND_ASSIGN(Tab); | 368 DISALLOW_COPY_AND_ASSIGN(Tab); |
| 366 }; | 369 }; |
| 367 | 370 |
| 368 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 371 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
| OLD | NEW |