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

Side by Side Diff: chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h

Issue 8769017: GTK: Move CairoCachedSurface from being owned by GtkThemeService to gfx::Image. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase for commit Created 9 years 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 unified diff | Download patch
OLDNEW
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 "chrome/browser/ui/gtk/cairo_cached_surface.h"
17 #include "content/public/browser/notification_observer.h" 16 #include "content/public/browser/notification_observer.h"
18 #include "content/public/browser/notification_registrar.h" 17 #include "content/public/browser/notification_registrar.h"
19 #include "third_party/skia/include/core/SkBitmap.h" 18 #include "third_party/skia/include/core/SkBitmap.h"
20 #include "ui/base/animation/animation_delegate.h" 19 #include "ui/base/animation/animation_delegate.h"
21 #include "ui/base/gtk/gtk_signal.h" 20 #include "ui/base/gtk/gtk_signal.h"
22 #include "ui/base/gtk/owned_widget_gtk.h" 21 #include "ui/base/gtk/owned_widget_gtk.h"
23 #include "ui/gfx/canvas.h" 22 #include "ui/gfx/canvas.h"
24 #include "ui/gfx/font.h" 23 #include "ui/gfx/font.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 Size; 29 class Size;
29 } // namespace gfx 30 } // namespace gfx
30 31
31 class CairoCachedSurface;
32 class CustomDrawButton; 32 class CustomDrawButton;
33 class TabContents; 33 class TabContents;
34 class GtkThemeService; 34 class GtkThemeService;
35 35
36 namespace ui { 36 namespace ui {
37 class SlideAnimation; 37 class SlideAnimation;
38 class ThrobAnimation; 38 class ThrobAnimation;
39 } 39 }
40 40
41 class TabRendererGtk : public ui::AnimationDelegate, 41 class TabRendererGtk : public ui::AnimationDelegate,
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 class FaviconCrashAnimation; 235 class FaviconCrashAnimation;
236 236
237 // Model data. We store this here so that we don't need to ask the underlying 237 // Model data. We store this here so that we don't need to ask the underlying
238 // model, which is tricky since instances of this object can outlive the 238 // model, which is tricky since instances of this object can outlive the
239 // corresponding objects in the underlying model. 239 // corresponding objects in the underlying model.
240 struct TabData { 240 struct TabData {
241 TabData(); 241 TabData();
242 ~TabData(); 242 ~TabData();
243 243
244 SkBitmap favicon; 244 SkBitmap favicon;
245 CairoCachedSurface cairo_favicon; 245 gfx::CairoCachedSurface cairo_favicon;
246 bool is_default_favicon; 246 bool is_default_favicon;
247 string16 title; 247 string16 title;
248 bool loading; 248 bool loading;
249 bool crashed; 249 bool crashed;
250 bool incognito; 250 bool incognito;
251 bool show_icon; 251 bool show_icon;
252 bool mini; 252 bool mini;
253 bool blocked; 253 bool blocked;
254 bool animating_mini_change; 254 bool animating_mini_change;
255 bool app; 255 bool app;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 void PaintIcon(GtkWidget* widget, cairo_t* cr); 293 void PaintIcon(GtkWidget* widget, cairo_t* cr);
294 void PaintTabBackground(GtkWidget* widget, cairo_t* cr); 294 void PaintTabBackground(GtkWidget* widget, cairo_t* cr);
295 void PaintInactiveTabBackground(GtkWidget* widget, cairo_t* cr); 295 void PaintInactiveTabBackground(GtkWidget* widget, cairo_t* cr);
296 void PaintActiveTabBackground(GtkWidget* widget, cairo_t* cr); 296 void PaintActiveTabBackground(GtkWidget* widget, cairo_t* cr);
297 void PaintLoadingAnimation(GtkWidget* widget, cairo_t* cairo); 297 void PaintLoadingAnimation(GtkWidget* widget, cairo_t* cairo);
298 298
299 // Draws the given |tab_bg| onto |cr| using the tab shape masks along the 299 // Draws the given |tab_bg| onto |cr| using the tab shape masks along the
300 // sides for the rounded tab shape. 300 // sides for the rounded tab shape.
301 void DrawTabBackground(cairo_t* cr, 301 void DrawTabBackground(cairo_t* cr,
302 GtkWidget* widget, 302 GtkWidget* widget,
303 CairoCachedSurface* tab_bg, 303 gfx::CairoCachedSurface* tab_bg,
304 int offset_x, 304 int offset_x,
305 int offset_y); 305 int offset_y);
306 306
307 // Draws the tab shadow using the given idr resources onto |cr|. 307 // Draws the tab shadow using the given idr resources onto |cr|.
308 void DrawTabShadow(cairo_t* cr, 308 void DrawTabShadow(cairo_t* cr,
309 GtkWidget* widget, 309 GtkWidget* widget,
310 int left_idr, 310 int left_idr,
311 int center_idr, 311 int center_idr,
312 int right_idr); 312 int right_idr);
313 313
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 // Color of the title text on the selected tab. 421 // Color of the title text on the selected tab.
422 SkColor selected_title_color_; 422 SkColor selected_title_color_;
423 423
424 // Color of the title text on an unselected tab. 424 // Color of the title text on an unselected tab.
425 SkColor unselected_title_color_; 425 SkColor unselected_title_color_;
426 426
427 DISALLOW_COPY_AND_ASSIGN(TabRendererGtk); 427 DISALLOW_COPY_AND_ASSIGN(TabRendererGtk);
428 }; 428 };
429 429
430 #endif // CHROME_BROWSER_UI_GTK_TABS_TAB_RENDERER_GTK_H_ 430 #endif // CHROME_BROWSER_UI_GTK_TABS_TAB_RENDERER_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/location_bar_view_gtk.cc ('k') | chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698