GTK: Port omnibox drawing from GdkGC interface to cairo.

(Now with a fix for the crash from Friday; we need to copy the bitmap into a different format first for ownership reasons.)

GdkGC is deprecated and will be removed in gtk3 and cairo should be faster anyway. This uses the new CairoCachedSurface in gfx::Image.

BUG=79722
TEST=none
First commit: http://src.chromium.org/viewvc/chrome?view=rev&revision=112839

Review URL: http://codereview.chromium.org/8781001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113033 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc
index 34a36e5..210e663 100644
--- a/chrome/browser/themes/theme_service.cc
+++ b/chrome/browser/themes/theme_service.cc
@@ -220,6 +220,20 @@
   LoadThemePrefs();
 }
 
+const gfx::Image* ThemeService::GetImageNamed(int id) const {
+  DCHECK(CalledOnValidThread());
+
+  const gfx::Image* image = NULL;
+
+  if (theme_pack_.get())
+    image = theme_pack_->GetImageNamed(id);
+
+  if (!image)
+    image = &rb_.GetNativeImageNamed(id);
+
+  return image;
+}
+
 SkBitmap* ThemeService::GetBitmapNamed(int id) const {
   DCHECK(CalledOnValidThread());