| 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, |
| 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 |
| 244 // Helper methods for PaintTabBackground. |
| 245 void PaintTabBackgroundFill(gfx::Canvas* canvas, |
| 246 const gfx::Path& fill_path, |
| 247 bool is_active, |
| 248 int fill_id, |
| 249 int y_offset); |
| 250 void PaintTabBackgroundStroke(gfx::Canvas* canvas, |
| 251 const gfx::Path& fill_path, |
| 252 bool active); |
| 243 | 253 |
| 244 // Paints the pinned tab title changed indicator and |favicon_|. |favicon_| | 254 // Paints the pinned tab title changed indicator and |favicon_|. |favicon_| |
| 245 // may be null. |favicon_draw_bounds| is |favicon_bounds_| adjusted for rtl | 255 // may be null. |favicon_draw_bounds| is |favicon_bounds_| adjusted for rtl |
| 246 // and clipped to the bounds of the tab. | 256 // and clipped to the bounds of the tab. |
| 247 void PaintPinnedTabTitleChangedIndicatorAndIcon( | 257 void PaintPinnedTabTitleChangedIndicatorAndIcon( |
| 248 gfx::Canvas* canvas, | 258 gfx::Canvas* canvas, |
| 249 const gfx::Rect& favicon_draw_bounds); | 259 const gfx::Rect& favicon_draw_bounds); |
| 250 | 260 |
| 251 // Paints the favicon, mirrored for RTL if needed. | 261 // Paints the favicon, mirrored for RTL if needed. |
| 252 void PaintIcon(gfx::Canvas* canvas); | 262 void PaintIcon(gfx::Canvas* canvas); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 | 362 |
| 353 // 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 |
| 354 // 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 |
| 355 // and thus may be null. | 365 // and thus may be null. |
| 356 gfx::ImageSkia favicon_; | 366 gfx::ImageSkia favicon_; |
| 357 | 367 |
| 358 DISALLOW_COPY_AND_ASSIGN(Tab); | 368 DISALLOW_COPY_AND_ASSIGN(Tab); |
| 359 }; | 369 }; |
| 360 | 370 |
| 361 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 371 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
| OLD | NEW |