summaryrefslogtreecommitdiffstats
path: root/ui/base
diff options
context:
space:
mode:
authorrbyers@chromium.org <rbyers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-31 22:08:44 +0000
committerrbyers@chromium.org <rbyers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-31 22:08:44 +0000
commit60512b89e72e603e526f4bb2f956cfa3c3c89438 (patch)
tree77da269ac722f9a8fed6f60609014d6408c2e6fb /ui/base
parentf1998c7f7ba076a23d89a95de879fe054ad22a15 (diff)
downloadchromium_src-60512b89e72e603e526f4bb2f956cfa3c3c89438.zip
chromium_src-60512b89e72e603e526f4bb2f956cfa3c3c89438.tar.gz
chromium_src-60512b89e72e603e526f4bb2f956cfa3c3c89438.tar.bz2
Update webkit_resources to support high-dpi assets
Move webkit_resource.grd to be in the same directory as all the resources. This is consistent with what we do elsewhere, and avoids a limitation of the new grit support for chrome_scaled_image (it expects 'context' to be a specific form). Move all the current images into a default_100_percent sub-directory. Images were added to their new location separately (due to try/cq limitations on binary files) here: http://src.chromium.org/viewvc/chrome?view=rev&revision=148389 Add support for the 2x text area resize corner image. Note that I didn't make the .cur files support multiple resolutions because .cur files themselves can contain multiple resolutions, and when we support high-DPI on windows (the only place these are used), we'll probably want to use multi-resolution .cur files so that the cursor seamlessly changes when moving between different density screens. Also fixes the addition of 'hand' cursors to be windows specific (as all the other cursors are now). TBR=sky@chromium.org BUG=134046 TEST= Review URL: https://chromiumcodereview.appspot.com/10701105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149290 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base')
-rw-r--r--ui/base/resource/resource_bundle_aurax11.cc12
-rw-r--r--ui/base/resource/resource_bundle_mac.mm4
-rw-r--r--ui/base/resource/resource_bundle_win.cc3
3 files changed, 16 insertions, 3 deletions
diff --git a/ui/base/resource/resource_bundle_aurax11.cc b/ui/base/resource/resource_bundle_aurax11.cc
index f443e57..14ffa3c 100644
--- a/ui/base/resource/resource_bundle_aurax11.cc
+++ b/ui/base/resource/resource_bundle_aurax11.cc
@@ -52,12 +52,15 @@ void ResourceBundle::LoadCommonResources() {
SCALE_FACTOR_100P);
if (ShouldLoad2xResources()) {
// 2x touch
- AddDataPackFromPath(
- GetResourcesPakFilePath("theme_resources_touch_200_percent.pak"),
- SCALE_FACTOR_200P);
+ AddDataPackFromPath(GetResourcesPakFilePath(
+ "theme_resources_touch_200_percent.pak"),
+ SCALE_FACTOR_200P);
AddDataPackFromPath(GetResourcesPakFilePath(
"ui_resources_touch_200_percent.pak"),
SCALE_FACTOR_200P);
+ AddDataPackFromPath(GetResourcesPakFilePath(
+ "webkit_resources_200_percent.pak"),
+ SCALE_FACTOR_200P);
}
} else {
// 1x non touch
@@ -75,6 +78,9 @@ void ResourceBundle::LoadCommonResources() {
AddDataPackFromPath(GetResourcesPakFilePath(
"ui_resources_200_percent.pak"),
SCALE_FACTOR_200P);
+ AddDataPackFromPath(GetResourcesPakFilePath(
+ "webkit_resources_200_percent.pak"),
+ SCALE_FACTOR_200P);
}
}
}
diff --git a/ui/base/resource/resource_bundle_mac.mm b/ui/base/resource/resource_bundle_mac.mm
index 4c46218..bafd94f 100644
--- a/ui/base/resource/resource_bundle_mac.mm
+++ b/ui/base/resource/resource_bundle_mac.mm
@@ -55,6 +55,8 @@ void ResourceBundle::LoadCommonResources() {
nil), SCALE_FACTOR_100P);
AddDataPackFromPath(GetResourcesPakFilePath(@"ui_resources_100_percent",
nil), SCALE_FACTOR_100P);
+ AddDataPackFromPath(GetResourcesPakFilePath(@"webkit_resources_100_percent",
+ nil), SCALE_FACTOR_100P);
// On Windows and ChromeOS we load either the 1x resource or the 2x resource.
// On Mac we load both and let the UI framework decide which one to use.
@@ -64,6 +66,8 @@ void ResourceBundle::LoadCommonResources() {
nil), SCALE_FACTOR_200P);
AddDataPackFromPath(GetResourcesPakFilePath(@"ui_resources_200_percent",
nil), SCALE_FACTOR_200P);
+ AddDataPackFromPath(GetResourcesPakFilePath(@"webkit_resources_200_percent",
+ nil), SCALE_FACTOR_200P);
}
#endif
}
diff --git a/ui/base/resource/resource_bundle_win.cc b/ui/base/resource/resource_bundle_win.cc
index 96f5409..cb2287a 100644
--- a/ui/base/resource/resource_bundle_win.cc
+++ b/ui/base/resource/resource_bundle_win.cc
@@ -63,6 +63,9 @@ void ResourceBundle::LoadCommonResources() {
AddDataPackFromPath(GetResourcesPakFilePath(
"ui_resources_200_percent.pak"),
SCALE_FACTOR_200P);
+ AddDataPackFromPath(GetResourcesPakFilePath(
+ "webkit_resources_200_percent.pak"),
+ SCALE_FACTOR_200P);
} else {
AddDataPackFromPath(
GetResourcesPakFilePath("theme_resources_100_percent.pak"),