Index: chrome/browser/ui/views/tabs/tab.h |
diff --git a/chrome/browser/ui/views/tabs/tab.h b/chrome/browser/ui/views/tabs/tab.h |
index bc31de495892b14f6dedddf680657c117b615367..e8feb6887a9142ed578cc10a0d0f82f5ddedb10b 100644 |
--- a/chrome/browser/ui/views/tabs/tab.h |
+++ b/chrome/browser/ui/views/tabs/tab.h |
@@ -33,6 +33,9 @@ class AnimationContainer; |
class LinearAnimation; |
class ThrobAnimation; |
} |
+namespace ui { |
+class ThemeProvider; |
+} |
namespace views { |
class ImageButton; |
class Label; |
@@ -52,6 +55,18 @@ class Tab : public gfx::AnimationDelegate, |
// The Tab's class name. |
static const char kViewClassName[]; |
+ struct PaintBackgroundParams { |
oshima
2016/07/13 20:55:28
can you move this to private & .cc file?
Greg Levin
2016/07/15 22:24:48
Done in Patch #3 ; moved to namespace in Patch #4.
|
+ const ui::ThemeProvider* tp; |
+ views::GlowHoverController* hc; |
+ bool is_active; |
+ int fill_id; |
+ bool has_custom_image; |
+ int x_offset; |
+ int y_offset; |
+ gfx::Size size; |
+ SkColor stroke_color; |
+ }; |
+ |
Tab(TabController* controller, gfx::AnimationContainer* container); |
~Tab() override; |
@@ -184,6 +199,7 @@ class Tab : public gfx::AnimationDelegate, |
class TabCloseButton; |
class ThrobberView; |
+ class TabImageSource; |
// All metadata necessary to uniquely identify a cached image. |
struct ImageCacheEntryMetadata; |
@@ -252,11 +268,15 @@ class Tab : public gfx::AnimationDelegate, |
int fill_id, |
bool has_custom_image, |
int y_offset); |
- void PaintTabFill(gfx::Canvas* canvas, |
- gfx::ImageSkia* fill_image, |
- int x_offset, |
- int y_offset, |
- bool is_active); |
+ static void PaintTabBackgroundUsingFillId( |
+ gfx::Canvas* canvas, |
+ const PaintBackgroundParams& params); |
+ static void PaintTabFill(gfx::Canvas* canvas, |
+ gfx::ImageSkia* fill_image, |
+ int x_offset, |
+ int y_offset, |
+ const gfx::Size& size, |
+ bool is_active); |
oshima
2016/07/13 20:55:28
move private static member function to anonymous n
Greg Levin
2016/07/15 22:24:48
Done. Moved PaintTabBackgroundUsingFillId() in Pa
|
// Paints the pinned tab title changed indicator and |favicon_|. |favicon_| |
// may be null. |favicon_draw_bounds| is |favicon_bounds_| adjusted for rtl |
@@ -309,13 +329,16 @@ class Tab : public gfx::AnimationDelegate, |
// Computes a path corresponding to the tab's content region inside the outer |
// stroke. |
- void GetFillPath(float scale, SkPath* path) const; |
+ static void GetFillPath(float scale, const gfx::Size& size, SkPath* path); |
// Computes a path corresponding to the tab's outer border for a given |scale| |
// and stores it in |path|. If |extend_to_top| is true, the path is extended |
// vertically to the top of the tab bounds. The caller uses this for Fitts' |
// Law purposes in maximized/fullscreen mode. |
- void GetBorderPath(float scale, bool extend_to_top, SkPath* path) const; |
+ static void GetBorderPath(float scale, |
+ const gfx::Size& size, |
+ bool extend_to_top, |
+ SkPath* path); |
// Returns the rectangle for the light bar in immersive mode. |
gfx::Rect GetImmersiveBarRect() const; |