| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ |
| 6 #define CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ | 6 #define CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include "app/animation.h" | 10 #include "app/animation.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // always show a close button and have a larger minimum size than unselected | 114 // always show a close button and have a larger minimum size than unselected |
| 115 // tabs. | 115 // tabs. |
| 116 static gfx::Size GetMinimumSelectedSize(); | 116 static gfx::Size GetMinimumSelectedSize(); |
| 117 // Returns the preferred size of a single Tab, assuming space is | 117 // Returns the preferred size of a single Tab, assuming space is |
| 118 // available. | 118 // available. |
| 119 static gfx::Size GetStandardSize(); | 119 static gfx::Size GetStandardSize(); |
| 120 | 120 |
| 121 // Loads the images to be used for the tab background. | 121 // Loads the images to be used for the tab background. |
| 122 static void LoadTabImages(); | 122 static void LoadTabImages(); |
| 123 | 123 |
| 124 // Sets the colors used for painting text on the tabs. |
| 125 static void SetSelectedTitleColor(SkColor color); |
| 126 static void SetUnselectedTitleColor(SkColor color); |
| 127 |
| 124 // Returns the bounds of the Tab. | 128 // Returns the bounds of the Tab. |
| 125 int x() const { return bounds_.x(); } | 129 int x() const { return bounds_.x(); } |
| 126 int y() const { return bounds_.y(); } | 130 int y() const { return bounds_.y(); } |
| 127 int width() const { return bounds_.width(); } | 131 int width() const { return bounds_.width(); } |
| 128 int height() const { return bounds_.height(); } | 132 int height() const { return bounds_.height(); } |
| 129 | 133 |
| 130 gfx::Rect bounds() const { return bounds_; } | 134 gfx::Rect bounds() const { return bounds_; } |
| 131 | 135 |
| 132 // Sets the bounds of the tab. | 136 // Sets the bounds of the tab. |
| 133 void SetBounds(const gfx::Rect& bounds); | 137 void SetBounds(const gfx::Rect& bounds); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 static TabImage tab_inactive_; | 255 static TabImage tab_inactive_; |
| 252 static TabImage tab_alpha; | 256 static TabImage tab_alpha; |
| 253 static TabImage tab_hover_; | 257 static TabImage tab_hover_; |
| 254 | 258 |
| 255 static gfx::Font* title_font_; | 259 static gfx::Font* title_font_; |
| 256 static int title_font_height_; | 260 static int title_font_height_; |
| 257 | 261 |
| 258 static int close_button_width_; | 262 static int close_button_width_; |
| 259 static int close_button_height_; | 263 static int close_button_height_; |
| 260 | 264 |
| 265 static SkColor selected_title_color_; |
| 266 static SkColor unselected_title_color_; |
| 267 |
| 261 // The GtkDrawingArea we draw the tab on. | 268 // The GtkDrawingArea we draw the tab on. |
| 262 OwnedWidgetGtk tab_; | 269 OwnedWidgetGtk tab_; |
| 263 | 270 |
| 264 // Whether we're showing the icon. It is cached so that we can detect when it | 271 // Whether we're showing the icon. It is cached so that we can detect when it |
| 265 // changes and layout appropriately. | 272 // changes and layout appropriately. |
| 266 bool showing_icon_; | 273 bool showing_icon_; |
| 267 | 274 |
| 268 // Whether we are showing the close button. It is cached so that we can | 275 // Whether we are showing the close button. It is cached so that we can |
| 269 // detect when it changes and layout appropriately. | 276 // detect when it changes and layout appropriately. |
| 270 bool showing_close_button_; | 277 bool showing_close_button_; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 291 // still render the old theme for this tab. | 298 // still render the old theme for this tab. |
| 292 ThemeProvider* theme_provider_; | 299 ThemeProvider* theme_provider_; |
| 293 | 300 |
| 294 // The close button. | 301 // The close button. |
| 295 scoped_ptr<CustomDrawButton> close_button_; | 302 scoped_ptr<CustomDrawButton> close_button_; |
| 296 | 303 |
| 297 DISALLOW_COPY_AND_ASSIGN(TabRendererGtk); | 304 DISALLOW_COPY_AND_ASSIGN(TabRendererGtk); |
| 298 }; | 305 }; |
| 299 | 306 |
| 300 #endif // CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ | 307 #endif // CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ |
| OLD | NEW |