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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 228 // Paints with the normal tab style. If |clip| is non-empty, the tab border | 228 // Paints with the normal tab style. If |clip| is non-empty, the tab border |
| 229 // should be clipped against it. | 229 // should be clipped against it. |
| 230 void PaintTab(gfx::Canvas* canvas, const gfx::Path& clip); | 230 void PaintTab(gfx::Canvas* canvas, const gfx::Path& clip); |
| 231 | 231 |
| 232 // Paints the background of an inactive tab. | 232 // Paints the background of an inactive tab. |
| 233 void PaintInactiveTabBackground(gfx::Canvas* canvas, const gfx::Path& clip); | 233 void PaintInactiveTabBackground(gfx::Canvas* canvas, const gfx::Path& clip); |
| 234 | 234 |
| 235 // Paints a tab background using the image defined by |fill_id| at the | 235 // Paints a tab background using the image defined by |fill_id| at the |
| 236 // provided offset. If |fill_id| is 0, it will fall back to using the solid | 236 // provided offset. If |fill_id| is 0, it will fall back to using the solid |
| 237 // color defined by the theme provider and ignore the offset. | 237 // color defined by the theme provider and ignore the offset. |
| 238 void PaintTabBackgroundUsingFillId(gfx::Canvas* fill_canvas, | 238 void PaintTabBackground(gfx::Canvas* canvas, |
| 239 gfx::Canvas* stroke_canvas, | 239 bool active, |
|
Peter Kasting
2017/04/06 00:52:11
Nit: For naming consistency, make this and the arg
danakj
2017/04/06 17:05:28
I changed it because is_active is incorrect. This
Peter Kasting
2017/04/06 18:49:45
OK; can we name the arg to the fill function |acti
danakj
2017/04/06 20:08:52
Yep, the .cc has it as |active| I just missed it h
| |
| 240 bool is_active, | 240 int fill_id, |
| 241 int fill_id, | 241 int y_offset, |
| 242 int y_offset); | 242 const gfx::Path* clip); |
| 243 void PaintTabBackgroundFill(gfx::Canvas* canvas, | |
|
Peter Kasting
2017/04/06 00:52:11
Nit: Maybe separate these two from the function ab
danakj
2017/04/06 17:05:28
Done.
| |
| 244 const gfx::Path& fill_path, | |
| 245 bool is_active, | |
| 246 int fill_id, | |
| 247 int y_offset); | |
| 248 void PaintTabBackgroundStroke(gfx::Canvas* canvas, | |
| 249 const gfx::Path& fill_path, | |
| 250 bool active); | |
| 243 | 251 |
| 244 // Paints the pinned tab title changed indicator and |favicon_|. |favicon_| | 252 // Paints the pinned tab title changed indicator and |favicon_|. |favicon_| |
| 245 // may be null. |favicon_draw_bounds| is |favicon_bounds_| adjusted for rtl | 253 // may be null. |favicon_draw_bounds| is |favicon_bounds_| adjusted for rtl |
| 246 // and clipped to the bounds of the tab. | 254 // and clipped to the bounds of the tab. |
| 247 void PaintPinnedTabTitleChangedIndicatorAndIcon( | 255 void PaintPinnedTabTitleChangedIndicatorAndIcon( |
| 248 gfx::Canvas* canvas, | 256 gfx::Canvas* canvas, |
| 249 const gfx::Rect& favicon_draw_bounds); | 257 const gfx::Rect& favicon_draw_bounds); |
| 250 | 258 |
| 251 // Paints the favicon, mirrored for RTL if needed. | 259 // Paints the favicon, mirrored for RTL if needed. |
| 252 void PaintIcon(gfx::Canvas* canvas); | 260 void PaintIcon(gfx::Canvas* canvas); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 352 | 360 |
| 353 // The favicon for the tab. This might be the sad tab icon or a copy of | 361 // The favicon for the tab. This might be the sad tab icon or a copy of |
| 354 // data().favicon and may be modified for theming. It is created on demand | 362 // data().favicon and may be modified for theming. It is created on demand |
| 355 // and thus may be null. | 363 // and thus may be null. |
| 356 gfx::ImageSkia favicon_; | 364 gfx::ImageSkia favicon_; |
| 357 | 365 |
| 358 DISALLOW_COPY_AND_ASSIGN(Tab); | 366 DISALLOW_COPY_AND_ASSIGN(Tab); |
| 359 }; | 367 }; |
| 360 | 368 |
| 361 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 369 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
| OLD | NEW |