summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-10 20:11:23 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-10 20:11:23 +0000
commit4692966bece55451e05a794ae064f3a3d16e2aa2 (patch)
tree090eb686373349d10b1c6f82c492c59845bfb7f9 /app
parent10b5d641e5b1149e5383aafdecd6447adce56031 (diff)
downloadchromium_src-4692966bece55451e05a794ae064f3a3d16e2aa2.zip
chromium_src-4692966bece55451e05a794ae064f3a3d16e2aa2.tar.gz
chromium_src-4692966bece55451e05a794ae064f3a3d16e2aa2.tar.bz2
Use system default favicon in tab strip when using GTK theme.
Review URL: http://codereview.chromium.org/164266 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22947 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r--app/gfx/canvas.h4
-rw-r--r--app/gfx/canvas_linux.cc6
2 files changed, 10 insertions, 0 deletions
diff --git a/app/gfx/canvas.h b/app/gfx/canvas.h
index 4b5f575..4cb8695 100644
--- a/app/gfx/canvas.h
+++ b/app/gfx/canvas.h
@@ -16,6 +16,7 @@
#if defined(OS_LINUX)
typedef struct _cairo cairo_t;
+typedef struct _GdkPixbuf GdkPixbuf;
#endif
namespace gfx {
@@ -186,6 +187,9 @@ class Canvas : public skia::PlatformCanvas {
// invoked anytime you plan on drawing directly to the cairo context. Be
// sure and set the matrix back to the identity when done.
void ApplySkiaMatrixToCairoContext(cairo_t* cr);
+
+ // Draw the pixbuf in its natural size at (x, y).
+ void DrawGdkPixbuf(GdkPixbuf* pixbuf, int x, int y);
#endif
// Compute the size required to draw some text with the provided font.
diff --git a/app/gfx/canvas_linux.cc b/app/gfx/canvas_linux.cc
index 155221c..c42df59 100644
--- a/app/gfx/canvas_linux.cc
+++ b/app/gfx/canvas_linux.cc
@@ -234,4 +234,10 @@ void Canvas::DrawStringInt(const std::wstring& text,
// NOTE: beginPlatformPaint returned its surface, we shouldn't destroy it.
}
+void Canvas::DrawGdkPixbuf(GdkPixbuf* pixbuf, int x, int y) {
+ cairo_t* cr = beginPlatformPaint();
+ gdk_cairo_set_source_pixbuf(cr, pixbuf, x, y);
+ cairo_paint(cr);
+}
+
} // namespace gfx