summaryrefslogtreecommitdiffstats
path: root/ui/base/resource/resource_bundle_gtk.cc
diff options
context:
space:
mode:
authorflackr@chromium.org <flackr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-24 11:04:57 +0000
committerflackr@chromium.org <flackr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-24 11:04:57 +0000
commitc49201a506dba0e3a04aad623e4b259f948f3159 (patch)
tree2a93fff52861f5c8dd87e23bc23d170b7cb1309e /ui/base/resource/resource_bundle_gtk.cc
parent16bb3c2f909662329b117e063280f6cfc2cca3f9 (diff)
downloadchromium_src-c49201a506dba0e3a04aad623e4b259f948f3159.zip
chromium_src-c49201a506dba0e3a04aad623e4b259f948f3159.tar.gz
chromium_src-c49201a506dba0e3a04aad623e4b259f948f3159.tar.bz2
Revert "Revert 137734 - Select theme resources from ResourceBundle at requested scale factor."
Relanding original CL 137734, http://codereview.chromium.org/10387010/. TBR=aa,abodenha,ben,sail,tony BUG=123611 TEST=All try bots pass and aura runs without errors. Review URL: https://chromiumcodereview.appspot.com/10412004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138769 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/resource/resource_bundle_gtk.cc')
-rw-r--r--ui/base/resource/resource_bundle_gtk.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/ui/base/resource/resource_bundle_gtk.cc b/ui/base/resource/resource_bundle_gtk.cc
index 1c64e4d..d969bc0 100644
--- a/ui/base/resource/resource_bundle_gtk.cc
+++ b/ui/base/resource/resource_bundle_gtk.cc
@@ -8,10 +8,11 @@
#include "base/logging.h"
#include "base/memory/ref_counted_memory.h"
#include "base/path_service.h"
-#include "ui/base/resource/resource_handle.h"
#include "base/synchronization/lock.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/gtk/scoped_gobject.h"
+#include "ui/base/layout.h"
+#include "ui/base/resource/resource_handle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/gfx/image/image.h"
@@ -65,11 +66,11 @@ FilePath GetResourcesPakFilePath(const std::string& pak_name) {
void ResourceBundle::LoadCommonResources() {
AddDataPack(GetResourcesPakFilePath("chrome.pak"),
- ResourceHandle::kScaleFactor100x);
+ SCALE_FACTOR_100P);
AddDataPack(GetResourcesPakFilePath("theme_resources_standard.pak"),
- ResourceHandle::kScaleFactor100x);
+ SCALE_FACTOR_100P);
AddDataPack(GetResourcesPakFilePath("ui_resources_standard.pak"),
- ResourceHandle::kScaleFactor100x);
+ SCALE_FACTOR_100P);
}
gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
@@ -89,7 +90,7 @@ gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
if (image.IsEmpty()) {
scoped_refptr<base::RefCountedStaticMemory> data(
- LoadDataResourceBytes(resource_id));
+ LoadDataResourceBytes(resource_id, SCALE_FACTOR_100P));
GdkPixbuf* pixbuf = LoadPixbuf(data.get(), rtl == RTL_ENABLED);
if (!pixbuf) {