summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/tabs/tab_gtk.h
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-20 22:43:55 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-20 22:43:55 +0000
commitd54be23ab7555175fc32ac143aae81e758b9d3e0 (patch)
treefb68992c56b67d275386d2b551608ac72ea0b3bd /chrome/browser/gtk/tabs/tab_gtk.h
parent42f1cf254b4ed6a21f126d750aba19ba840f002a (diff)
downloadchromium_src-d54be23ab7555175fc32ac143aae81e758b9d3e0.zip
chromium_src-d54be23ab7555175fc32ac143aae81e758b9d3e0.tar.gz
chromium_src-d54be23ab7555175fc32ac143aae81e758b9d3e0.tar.bz2
gtk: Update the tooltip state whenever the tab is resized.
BUG=19754 TEST=Open a new window and browse to google.com. Hover the mouse over the tab and notice that the tooltip does not display. Open enough new tabs so that the google.com tab title is ellipsized. Hover the mouse over the tab and notice that the tooltip displays. Review URL: http://codereview.chromium.org/174188 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23899 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/tabs/tab_gtk.h')
-rw-r--r--chrome/browser/gtk/tabs/tab_gtk.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/gtk/tabs/tab_gtk.h b/chrome/browser/gtk/tabs/tab_gtk.h
index 933622a..dd8547b 100644
--- a/chrome/browser/gtk/tabs/tab_gtk.h
+++ b/chrome/browser/gtk/tabs/tab_gtk.h
@@ -93,6 +93,7 @@ class TabGtk : public TabRendererGtk,
virtual void SetVisible(bool visible) const;
virtual void CloseButtonClicked();
virtual void UpdateData(TabContents* contents, bool loading_only);
+ virtual void SetBounds(const gfx::Rect& bounds);
// button-press-event handler that handles mouse clicks.
static gboolean OnMousePress(GtkWidget* widget, GdkEventButton* event,
@@ -129,6 +130,10 @@ class TabGtk : public TabRendererGtk,
// Invoked when the context menu closes.
void ContextMenuClosed();
+ // Sets whether the tooltip should be shown or not, depending on the size of
+ // the tab.
+ void UpdateTooltipState();
+
// An instance of a delegate object that can perform various actions based on
// user gestures.
TabDelegate* delegate_;
@@ -150,6 +155,10 @@ class TabGtk : public TabRendererGtk,
// True if this tab is being dragged.
bool dragging_;
+ // The cached width of the title in pixels, updated whenever the title
+ // changes.
+ int title_width_;
+
DISALLOW_COPY_AND_ASSIGN(TabGtk);
};