summaryrefslogtreecommitdiffstats
path: root/ui/base
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-13 01:25:40 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-13 01:25:40 +0000
commitc802c52012d99f2d210afaa771a7eb4ba9951556 (patch)
tree5077f28915dacfddd376947d7510764110462103 /ui/base
parent80d341afffc7b1d1ce2d1825cc84e593e98421b0 (diff)
downloadchromium_src-c802c52012d99f2d210afaa771a7eb4ba9951556.zip
chromium_src-c802c52012d99f2d210afaa771a7eb4ba9951556.tar.gz
chromium_src-c802c52012d99f2d210afaa771a7eb4ba9951556.tar.bz2
GTK: Remove the one user of GetRTLEnabledSurfaceNamed() and move it over to ResourceBundle().
BUG=106060 TEST=none Review URL: http://codereview.chromium.org/8917026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114138 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base')
-rw-r--r--ui/base/resource/resource_bundle.h3
-rw-r--r--ui/base/resource/resource_bundle_gtk.cc4
2 files changed, 7 insertions, 0 deletions
diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h
index 84bc5d5..52d6fe4 100644
--- a/ui/base/resource/resource_bundle.h
+++ b/ui/base/resource/resource_bundle.h
@@ -180,6 +180,9 @@ class UI_EXPORT ResourceBundle {
// This function flips it in RTL locales.
GdkPixbuf* GetRTLEnabledPixbufNamed(int resource_id);
+ // Same as above, but returns a gfx::Image wrapping the GdkPixbuf.
+ gfx::Image& GetRTLEnabledImageNamed(int resource_id);
+
private:
// Shared implementation for the above two functions.
gfx::Image* GetPixbufImpl(int resource_id, bool rtl_enabled);
diff --git a/ui/base/resource/resource_bundle_gtk.cc b/ui/base/resource/resource_bundle_gtk.cc
index 019c520..d217201 100644
--- a/ui/base/resource/resource_bundle_gtk.cc
+++ b/ui/base/resource/resource_bundle_gtk.cc
@@ -94,4 +94,8 @@ GdkPixbuf* ResourceBundle::GetRTLEnabledPixbufNamed(int resource_id) {
return *GetPixbufImpl(resource_id, true);
}
+gfx::Image& ResourceBundle::GetRTLEnabledImageNamed(int resource_id) {
+ return *GetPixbufImpl(resource_id, true);
+}
+
} // namespace ui