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

Unified Diff: chrome/browser/views/tabs/tab_strip.h

Issue 150041: Theme window control buttons.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Theme window control buttons.... Created 11 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 | « chrome/browser/views/frame/opaque_browser_frame_view.cc ('k') | chrome/browser/views/tabs/tab_strip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tabs/tab_strip.h
===================================================================
--- chrome/browser/views/tabs/tab_strip.h (revision 19774)
+++ chrome/browser/views/tabs/tab_strip.h (working copy)
@@ -89,6 +89,9 @@
// Set the background offset used by inactive tabs to match the frame image.
void SetBackgroundOffset(gfx::Point offset);
+ // Create the new tab button.
+ void InitTabStripButtons();
+
// views::View overrides:
virtual void PaintChildren(gfx::Canvas* canvas);
virtual views::View* GetViewByID(int id) const;
@@ -104,6 +107,7 @@
virtual bool GetAccessibleName(std::wstring* name);
virtual void SetAccessibleName(const std::wstring& name);
virtual views::View* GetViewForPoint(const gfx::Point& point);
+ virtual void ThemeChanged();
protected:
// TabStripModelObserver implementation:
@@ -166,6 +170,9 @@
TabStrip();
void Init();
+ // Set the images for the new tab button.
+ void LoadNewTabButtonImage();
+
// Retrieves the Tab at the specified index. Take care in using this, you may
// need to use GetTabAtAdjustForAnimation.
Tab* GetTabAt(int index) const;
@@ -303,7 +310,6 @@
// The "New Tab" button.
views::ImageButton* newtab_button_;
gfx::Size newtab_button_size_;
- gfx::Size actual_newtab_button_size_;
// The current widths of various types of tabs. We save these so that, as
// users close tabs while we're holding them at the same size, we can lay out
@@ -324,6 +330,13 @@
// Storage of strings needed for accessibility.
std::wstring accessible_name_;
+ // The size of the new tab button must be hardcoded because we need to be
+ // able to lay it out before we are able to get its image from the
+ // ThemeProvider. It also makes sense to do this, because the size of the
+ // new tab button should not need to be calculated dynamically.
+ static const int kNewTabButtonWidth = 28;
+ static const int kNewTabButtonHeight = 18;
+
// Used during a drop session of a url. Tracks the position of the drop as
// well as a window used to highlight where the drop occurs.
struct DropInfo {
« no previous file with comments | « chrome/browser/views/frame/opaque_browser_frame_view.cc ('k') | chrome/browser/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698