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

Unified Diff: ui/base/resource/resource_bundle_gtk.cc

Issue 10387010: Select theme resources from ResourceBundle at requested scale factor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with master. Created 8 years, 7 months 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 side-by-side diff with in-line comments
Download patch
Index: ui/base/resource/resource_bundle_gtk.cc
diff --git a/ui/base/resource/resource_bundle_gtk.cc b/ui/base/resource/resource_bundle_gtk.cc
index 1c64e4db52d276d470ef20d90e39bb938a8ed9d0..d969bc0256fe0691b2c5d6b86b2c7060f175dce2 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) {

Powered by Google App Engine
This is Rietveld 408576698