Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(721)

Unified Diff: chrome/browser/ui/views/tabs/tab.h

Issue 327273005: Revert of Use labels to display views tab titles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698