| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_UI_GTK_TABS_TAB_RENDERER_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_TABS_TAB_RENDERER_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_TABS_TAB_RENDERER_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_TABS_TAB_RENDERER_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 #include <map> | 10 #include <map> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/string16.h" | 15 #include "base/string16.h" |
| 16 #include "content/public/browser/notification_observer.h" | 16 #include "content/public/browser/notification_observer.h" |
| 17 #include "content/public/browser/notification_registrar.h" | 17 #include "content/public/browser/notification_registrar.h" |
| 18 #include "third_party/skia/include/core/SkBitmap.h" | 18 #include "third_party/skia/include/core/SkBitmap.h" |
| 19 #include "ui/base/animation/animation_delegate.h" | 19 #include "ui/base/animation/animation_delegate.h" |
| 20 #include "ui/base/gtk/gtk_signal.h" | 20 #include "ui/base/gtk/gtk_signal.h" |
| 21 #include "ui/base/gtk/owned_widget_gtk.h" | 21 #include "ui/base/gtk/owned_widget_gtk.h" |
| 22 #include "ui/gfx/canvas.h" | 22 #include "ui/gfx/canvas.h" |
| 23 #include "ui/gfx/font.h" | 23 #include "ui/gfx/font.h" |
| 24 #include "ui/gfx/image/cairo_cached_surface.h" | 24 #include "ui/gfx/image/cairo_cached_surface.h" |
| 25 #include "ui/gfx/rect.h" | 25 #include "ui/gfx/rect.h" |
| 26 | 26 |
| 27 namespace gfx { | 27 namespace gfx { |
| 28 class CairoCachedSurface; | 28 class CairoCachedSurface; |
| 29 class Image; |
| 29 class Size; | 30 class Size; |
| 30 } // namespace gfx | 31 } // namespace gfx |
| 31 | 32 |
| 32 class CustomDrawButton; | 33 class CustomDrawButton; |
| 33 class TabContents; | 34 class TabContents; |
| 34 class GtkThemeService; | 35 class GtkThemeService; |
| 35 | 36 |
| 36 namespace ui { | 37 namespace ui { |
| 37 class SlideAnimation; | 38 class SlideAnimation; |
| 38 class ThrobAnimation; | 39 class ThrobAnimation; |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 void PaintIcon(GtkWidget* widget, cairo_t* cr); | 294 void PaintIcon(GtkWidget* widget, cairo_t* cr); |
| 294 void PaintTabBackground(GtkWidget* widget, cairo_t* cr); | 295 void PaintTabBackground(GtkWidget* widget, cairo_t* cr); |
| 295 void PaintInactiveTabBackground(GtkWidget* widget, cairo_t* cr); | 296 void PaintInactiveTabBackground(GtkWidget* widget, cairo_t* cr); |
| 296 void PaintActiveTabBackground(GtkWidget* widget, cairo_t* cr); | 297 void PaintActiveTabBackground(GtkWidget* widget, cairo_t* cr); |
| 297 void PaintLoadingAnimation(GtkWidget* widget, cairo_t* cairo); | 298 void PaintLoadingAnimation(GtkWidget* widget, cairo_t* cairo); |
| 298 | 299 |
| 299 // Draws the given |tab_bg| onto |cr| using the tab shape masks along the | 300 // Draws the given |tab_bg| onto |cr| using the tab shape masks along the |
| 300 // sides for the rounded tab shape. | 301 // sides for the rounded tab shape. |
| 301 void DrawTabBackground(cairo_t* cr, | 302 void DrawTabBackground(cairo_t* cr, |
| 302 GtkWidget* widget, | 303 GtkWidget* widget, |
| 303 gfx::CairoCachedSurface* tab_bg, | 304 const gfx::Image* tab_bg, |
| 304 int offset_x, | 305 int offset_x, |
| 305 int offset_y); | 306 int offset_y); |
| 306 | 307 |
| 307 // Draws the tab shadow using the given idr resources onto |cr|. | 308 // Draws the tab shadow using the given idr resources onto |cr|. |
| 308 void DrawTabShadow(cairo_t* cr, | 309 void DrawTabShadow(cairo_t* cr, |
| 309 GtkWidget* widget, | 310 GtkWidget* widget, |
| 310 int left_idr, | 311 int left_idr, |
| 311 int center_idr, | 312 int center_idr, |
| 312 int right_idr); | 313 int right_idr); |
| 313 | 314 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 // Color of the title text on the selected tab. | 422 // Color of the title text on the selected tab. |
| 422 SkColor selected_title_color_; | 423 SkColor selected_title_color_; |
| 423 | 424 |
| 424 // Color of the title text on an unselected tab. | 425 // Color of the title text on an unselected tab. |
| 425 SkColor unselected_title_color_; | 426 SkColor unselected_title_color_; |
| 426 | 427 |
| 427 DISALLOW_COPY_AND_ASSIGN(TabRendererGtk); | 428 DISALLOW_COPY_AND_ASSIGN(TabRendererGtk); |
| 428 }; | 429 }; |
| 429 | 430 |
| 430 #endif // CHROME_BROWSER_UI_GTK_TABS_TAB_RENDERER_GTK_H_ | 431 #endif // CHROME_BROWSER_UI_GTK_TABS_TAB_RENDERER_GTK_H_ |
| OLD | NEW |