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-04-27 22:52:52 +0000
committerflackr@chromium.org <flackr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-27 22:52:52 +0000
commit0e88cbea52e478a9f6a2f63d9e2dee06c1b39de9 (patch)
tree2e5aaf68d7f3e6c5d87bd30c1afd522ad9698045 /ui/base/resource/resource_bundle_gtk.cc
parentaa752c3f3c06918c0d684044c8418d3a6f33c37c (diff)
downloadchromium_src-0e88cbea52e478a9f6a2f63d9e2dee06c1b39de9.zip
chromium_src-0e88cbea52e478a9f6a2f63d9e2dee06c1b39de9.tar.gz
chromium_src-0e88cbea52e478a9f6a2f63d9e2dee06c1b39de9.tar.bz2
Use touch friendly window buttons in aura when using --touch-optimized-ui.
I have increased the padding in the assets used for the buttons when running with touch optimized ui enabled. BUG=115520 TEST=Run with --touch-optimized-ui and verify that maximize and close buttons are large and all assets look correct. Review URL: http://codereview.chromium.org/10159002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134376 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/resource/resource_bundle_gtk.cc')
-rw-r--r--ui/base/resource/resource_bundle_gtk.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/ui/base/resource/resource_bundle_gtk.cc b/ui/base/resource/resource_bundle_gtk.cc
index ddabaf3..bc4a5cc 100644
--- a/ui/base/resource/resource_bundle_gtk.cc
+++ b/ui/base/resource/resource_bundle_gtk.cc
@@ -7,9 +7,11 @@
#include "base/i18n/rtl.h"
#include "base/logging.h"
#include "base/memory/ref_counted_memory.h"
+#include "base/path_service.h"
#include "base/synchronization/lock.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/gtk/scoped_gobject.h"
+#include "ui/base/ui_base_paths.h"
#include "ui/gfx/image/image.h"
#include <gtk/gtk.h>
@@ -49,8 +51,21 @@ GdkPixbuf* LoadPixbuf(base::RefCountedStaticMemory* data, bool rtl_enabled) {
}
}
+FilePath GetResourcesPakFilePath(const std::string& pak_name) {
+ FilePath path;
+ if (PathService::Get(base::DIR_MODULE, &path))
+ return path.AppendASCII(pak_name.c_str());
+ return FilePath();
+}
+
} // namespace
+void ResourceBundle::LoadCommonResources() {
+ AddDataPack(GetResourcesPakFilePath("chrome.pak"));
+ AddDataPack(GetResourcesPakFilePath("theme_resources_standard.pak"));
+ AddDataPack(GetResourcesPakFilePath("ui_resources_standard.pak"));
+}
+
gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
// Use the negative |resource_id| for the key for BIDI-aware images.
int key = rtl == RTL_ENABLED ? -resource_id : resource_id;