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 ab362b4f2e456d79c457906c341f4b7de1982c61..d5b71cdef3c8f3104d686a13cadec324f0df8aa8 100644 |
--- a/chrome/browser/ui/views/tabs/tab.h |
+++ b/chrome/browser/ui/views/tabs/tab.h |
@@ -24,12 +24,12 @@ |
namespace gfx { |
class Animation; |
class AnimationContainer; |
+class Font; |
class LinearAnimation; |
class MultiAnimation; |
} |
namespace views { |
class ImageButton; |
-class Label; |
} |
/////////////////////////////////////////////////////////////////////////////// |
@@ -185,6 +185,10 @@ |
// Overridden from ui::EventHandler: |
virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
+ // Returns the bounds of the title and icon. |
+ const gfx::Rect& GetTitleBounds() const; |
+ const gfx::Rect& GetIconBounds() const; |
+ |
// Invoked from Layout to adjust the position of the favicon or media |
// indicator for mini tabs. |
void MaybeAdjustLeftForMiniTab(gfx::Rect* bounds) const; |
@@ -208,9 +212,10 @@ |
int tab_id); |
void PaintActiveTabBackground(gfx::Canvas* canvas); |
- // Paints the favicon and media indicator icon, mirrored for RTL if needed. |
+ // Paints the favicon, media indicator icon, etc., mirrored for RTL if needed. |
void PaintIcon(gfx::Canvas* canvas); |
void PaintMediaIndicator(gfx::Canvas* canvas); |
+ void PaintTitle(gfx::Canvas* canvas, SkColor title_color); |
// Invoked if data_.network_state changes, or the network_state is not none. |
void AdvanceLoadingAnimation(TabRendererData::NetworkState old_state, |
@@ -321,7 +326,6 @@ |
scoped_refptr<gfx::AnimationContainer> animation_container_; |
views::ImageButton* close_button_; |
- views::Label* title_; |
bool tab_activated_with_last_gesture_begin_; |
@@ -329,6 +333,7 @@ |
// The bounds of various sections of the display. |
gfx::Rect favicon_bounds_; |
+ gfx::Rect title_bounds_; |
gfx::Rect media_indicator_bounds_; |
// The offset used to paint the inactive background image. |
@@ -360,6 +365,9 @@ |
// The current color of the close button. |
SkColor close_button_color_; |
+ static gfx::Font* font_; |
+ static int font_height_; |
+ |
// As the majority of the tabs are inactive, and painting tabs is slowish, |
// we cache a handful of the inactive tab backgrounds here. |
static ImageCache* image_cache_; |