| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 | 288 |
| 289 static gfx::Font* title_font_; | 289 static gfx::Font* title_font_; |
| 290 static int title_font_height_; | 290 static int title_font_height_; |
| 291 | 291 |
| 292 static int close_button_width_; | 292 static int close_button_width_; |
| 293 static int close_button_height_; | 293 static int close_button_height_; |
| 294 | 294 |
| 295 static SkColor selected_title_color_; | 295 static SkColor selected_title_color_; |
| 296 static SkColor unselected_title_color_; | 296 static SkColor unselected_title_color_; |
| 297 | 297 |
| 298 // Preferred width of pinned tabs. | |
| 299 static int pinned_tab_pref_width_; | |
| 300 | |
| 301 // When a non-pinned tab is pinned the width of the tab animates. If the | |
| 302 // width of a pinned tab is >= pinned_tab_renderer_as_tab_width then the | |
| 303 // tab is rendered as a normal tab. This is done to avoid having the title | |
| 304 // immediately disappear when transitioning a tab from normal to pinned. | |
| 305 static int pinned_tab_renderer_as_tab_width_; | |
| 306 | |
| 307 // The GtkDrawingArea we draw the tab on. | 298 // The GtkDrawingArea we draw the tab on. |
| 308 OwnedWidgetGtk tab_; | 299 OwnedWidgetGtk tab_; |
| 309 | 300 |
| 310 // Whether we're showing the icon. It is cached so that we can detect when it | 301 // Whether we're showing the icon. It is cached so that we can detect when it |
| 311 // changes and layout appropriately. | 302 // changes and layout appropriately. |
| 312 bool showing_icon_; | 303 bool showing_icon_; |
| 313 | 304 |
| 314 // Whether we are showing the close button. It is cached so that we can | 305 // Whether we are showing the close button. It is cached so that we can |
| 315 // detect when it changes and layout appropriately. | 306 // detect when it changes and layout appropriately. |
| 316 bool showing_close_button_; | 307 bool showing_close_button_; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 337 // still render the old theme for this tab. | 328 // still render the old theme for this tab. |
| 338 ThemeProvider* theme_provider_; | 329 ThemeProvider* theme_provider_; |
| 339 | 330 |
| 340 // The close button. | 331 // The close button. |
| 341 scoped_ptr<CustomDrawButton> close_button_; | 332 scoped_ptr<CustomDrawButton> close_button_; |
| 342 | 333 |
| 343 DISALLOW_COPY_AND_ASSIGN(TabRendererGtk); | 334 DISALLOW_COPY_AND_ASSIGN(TabRendererGtk); |
| 344 }; | 335 }; |
| 345 | 336 |
| 346 #endif // CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ | 337 #endif // CHROME_BROWSER_GTK_TABS_TAB_RENDERER_GTK_H_ |
| OLD | NEW |