Commit b3ff3b05 authored by flackr@chromium.org's avatar flackr@chromium.org

Repack separate 100 / 200 / touch_100 / touch_200 files into single pak files.

BUG=139803
TEST=Chrome runs with ui and theme resources correctly loaded.

Review URL: https://chromiumcodereview.appspot.com/10825111

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150411 0039d316-1c4b-4281-b951-d872f2087c98
parent 0da3574c
...@@ -119,11 +119,8 @@ class TestPackage(object): ...@@ -119,11 +119,8 @@ class TestPackage(object):
self.test_suite_dirname + '/resources.pak', self.test_suite_dirname + '/resources.pak',
'/data/local/tmp/paks/resources.pak') '/data/local/tmp/paks/resources.pak')
self.adb.PushIfNeeded( self.adb.PushIfNeeded(
self.test_suite_dirname + '/theme_resources_100_percent.pak', self.test_suite_dirname + '/chrome_100_percent.pak',
'/data/local/tmp/paks/theme_resources_100_percent.pak') '/data/local/tmp/paks/chrome_100_percent.pak')
self.adb.PushIfNeeded(
self.test_suite_dirname + '/ui_resources_100_percent.pak',
'/data/local/tmp/paks/ui_resources_100_percent.pak')
self.adb.PushIfNeeded(self.test_suite_dirname + '/test_data', self.adb.PushIfNeeded(self.test_suite_dirname + '/test_data',
'/data/local/tmp/test_data') '/data/local/tmp/test_data')
if self.test_suite_basename == 'content_unittests': if self.test_suite_basename == 'content_unittests':
......
...@@ -289,9 +289,8 @@ ...@@ -289,9 +289,8 @@
'app/theme/otr_icon.pdf', 'app/theme/otr_icon.pdf',
'browser/mac/install.sh', 'browser/mac/install.sh',
'<(SHARED_INTERMEDIATE_DIR)/repack/chrome.pak', '<(SHARED_INTERMEDIATE_DIR)/repack/chrome.pak',
'<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak', '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak',
'<(grit_out_dir)/theme_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
'<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))', '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))',
# Note: pseudo_locales are generated via the packed_resources # Note: pseudo_locales are generated via the packed_resources
# dependency but not copied to the final target. See # dependency but not copied to the final target. See
...@@ -532,9 +531,7 @@ ...@@ -532,9 +531,7 @@
}], }],
['enable_hidpi==1', { ['enable_hidpi==1', {
'mac_bundle_resources': [ 'mac_bundle_resources': [
'<(grit_out_dir)/theme_resources_200_percent.pak', '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_200_percent.pak',
], ],
}], }],
], # conditions ], # conditions
......
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'action_name': 'repack_chrome_resources_100_percent',
'variables': {
'pak_inputs': [
'<(grit_out_dir)/theme_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
],
},
'inputs': [
'<(repack_path)',
'<@(pak_inputs)',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak',
],
'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'],
}
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'action_name': 'repack_chrome_resources_200_percent',
'variables': {
'pak_inputs': [
'<(grit_out_dir)/theme_resources_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_200_percent.pak',
],
},
'inputs': [
'<(repack_path)',
'<@(pak_inputs)',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/repack/chrome_200_percent.pak',
],
'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'],
}
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'action_name': 'repack_chrome_touch_resources_100_percent',
'variables': {
'pak_inputs': [
'<(grit_out_dir)/theme_resources_touch_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_touch_100_percent.pak',
],
},
'inputs': [
'<(repack_path)',
'<@(pak_inputs)',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/repack/chrome_touch_100_percent.pak',
],
'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'],
}
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'action_name': 'repack_chrome_touch_resources_200_percent',
'variables': {
'pak_inputs': [
'<(grit_out_dir)/theme_resources_touch_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_touch_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_200_percent.pak',
],
},
'inputs': [
'<(repack_path)',
'<@(pak_inputs)',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/repack/chrome_touch_200_percent.pak',
],
'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'],
}
...@@ -221,53 +221,6 @@ ...@@ -221,53 +221,6 @@
'theme_resources_gen', 'theme_resources_gen',
'<(DEPTH)/ui/ui.gyp:ui_resources', '<(DEPTH)/ui/ui.gyp:ui_resources',
], ],
'conditions': [
['OS != "mac"', {
# Copy pak files to the product directory. These files will be picked
# up by the following installer scripts:
# - Windows: chrome/installer/mini_installer/chrome.release
# - Linux: chrome/installer/linux/internal/common/installer.include
# Ensure that the above scripts are updated when adding or removing
# pak files.
# Copying files to the product directory is not needed on the Mac
# since the framework build phase will copy them into the framework
# bundle directly.
'copies': [
{
'destination': '<(PRODUCT_DIR)',
'files': [
'<(grit_out_dir)/theme_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
],
},
],
}],
['(OS != "mac" and enable_hidpi == 1) or chromeos == 1', {
'copies': [
{
'destination': '<(PRODUCT_DIR)',
'files': [
'<(grit_out_dir)/theme_resources_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_200_percent.pak',
],
},
],
}],
['enable_touch_ui==1', {
'copies': [
{
'destination': '<(PRODUCT_DIR)',
'files': [
'<(grit_out_dir)/theme_resources_touch_100_percent.pak',
'<(grit_out_dir)/theme_resources_touch_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_touch_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_touch_200_percent.pak',
],
},
],
}],
],
}, },
{ {
'target_name': 'packed_extra_resources', 'target_name': 'packed_extra_resources',
...@@ -330,11 +283,30 @@ ...@@ -330,11 +283,30 @@
{ {
'includes': ['chrome_repack_pseudo_locales.gypi'] 'includes': ['chrome_repack_pseudo_locales.gypi']
}, },
{
'includes': ['chrome_repack_chrome_100_percent.gypi']
},
{
'includes': ['chrome_repack_chrome_200_percent.gypi']
},
{
'includes': ['chrome_repack_chrome_touch_100_percent.gypi']
},
{
'includes': ['chrome_repack_chrome_touch_200_percent.gypi']
},
], ],
'conditions': [ 'conditions': [
['OS != "mac"', { ['OS != "mac"', {
# We'll install the resource files to the product directory. The Mac # Copy pak files to the product directory. These files will be picked
# copies the results over as bundle resources in its own special way. # up by the following installer scripts:
# - Windows: chrome/installer/mini_installer/chrome.release
# - Linux: chrome/installer/linux/internal/common/installer.include
# Ensure that the above scripts are updated when adding or removing
# pak files.
# Copying files to the product directory is not needed on the Mac
# since the framework build phase will copy them into the framework
# bundle directly.
'copies': [ 'copies': [
{ {
'destination': '<(PRODUCT_DIR)', 'destination': '<(PRODUCT_DIR)',
...@@ -342,6 +314,12 @@ ...@@ -342,6 +314,12 @@
'<(SHARED_INTERMEDIATE_DIR)/repack/chrome.pak' '<(SHARED_INTERMEDIATE_DIR)/repack/chrome.pak'
], ],
}, },
{
'destination': '<(PRODUCT_DIR)',
'files': [
'<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak'
],
},
{ {
'destination': '<(PRODUCT_DIR)/locales', 'destination': '<(PRODUCT_DIR)/locales',
'files': [ 'files': [
...@@ -369,6 +347,36 @@ ...@@ -369,6 +347,36 @@
}, },
], ],
}], }],
['enable_hidpi == 1 or chromeos == 1', {
'copies': [
{
'destination': '<(PRODUCT_DIR)',
'files': [
'<(SHARED_INTERMEDIATE_DIR)/repack/chrome_200_percent.pak',
],
},
],
}],
['enable_touch_ui==1', {
'copies': [
{
'destination': '<(PRODUCT_DIR)',
'files': [
'<(SHARED_INTERMEDIATE_DIR)/repack/chrome_touch_100_percent.pak',
],
},
],
}],
['enable_hidpi == 1 and enable_touch_ui==1', {
'copies': [
{
'destination': '<(PRODUCT_DIR)',
'files': [
'<(SHARED_INTERMEDIATE_DIR)/repack/chrome_touch_200_percent.pak',
],
},
],
}],
], # conditions ], # conditions
}], # end OS != "mac" }], # end OS != "mac"
], # conditions ], # conditions
......
...@@ -13,8 +13,7 @@ nacl_irt_x86_32.nexe: %(VersionDir)s\ ...@@ -13,8 +13,7 @@ nacl_irt_x86_32.nexe: %(VersionDir)s\
nacl_irt_x86_64.nexe: %(VersionDir)s\ nacl_irt_x86_64.nexe: %(VersionDir)s\
icudt.dll: %(VersionDir)s\ icudt.dll: %(VersionDir)s\
resources.pak: %(VersionDir)s\ resources.pak: %(VersionDir)s\
theme_resources_100_percent.pak: %(VersionDir)s\ chrome_100_percent.pak: %(VersionDir)s\
ui_resources_100_percent.pak: %(VersionDir)s\
locales\*.pak: %(VersionDir)s\Locales locales\*.pak: %(VersionDir)s\Locales
locales\*.dll: %(VersionDir)s\Locales locales\*.dll: %(VersionDir)s\Locales
npchrome_frame.dll: %(VersionDir)s\ npchrome_frame.dll: %(VersionDir)s\
...@@ -33,12 +32,10 @@ default_apps\*.crx: %(VersionDir)s\default_apps\ ...@@ -33,12 +32,10 @@ default_apps\*.crx: %(VersionDir)s\default_apps\
default_apps\external_extensions.json: %(VersionDir)s\default_apps\ default_apps\external_extensions.json: %(VersionDir)s\default_apps\
[HIDPI] [HIDPI]
theme_resources_200_percent.pak: %(VersionDir)s\ chrome_200_percent.pak: %(VersionDir)s\
ui_resources_200_percent.pak: %(VersionDir)s\
webkit_resources_200_percent.pak: %(VersionDir)s\
[TOUCH] [TOUCH]
theme_resources_touch_100_percent.pak: %(VersionDir)s\ chrome_touch_100_percent.pak: %(VersionDir)s\
[GOOGLE_CHROME] [GOOGLE_CHROME]
FlashPlayerApp.exe: %(VersionDir)s\ FlashPlayerApp.exe: %(VersionDir)s\
......
...@@ -39,6 +39,11 @@ FILES = [ ...@@ -39,6 +39,11 @@ FILES = [
'arch': ['32bit', '64bit'], 'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'], 'buildtype': ['dev', 'official'],
}, },
{
'filename': 'chrome_100_percent.pak',
'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'],
},
{ {
'filename': 'chrome_sandbox', 'filename': 'chrome_sandbox',
'arch': ['32bit', '64bit'], 'arch': ['32bit', '64bit'],
...@@ -84,16 +89,6 @@ FILES = [ ...@@ -84,16 +89,6 @@ FILES = [
'arch': ['32bit', '64bit'], 'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'], 'buildtype': ['dev', 'official'],
}, },
{
'filename': 'theme_resources_100_percent.pak',
'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'],
},
{
'filename': 'ui_resources_100_percent.pak',
'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'],
},
{ {
'filename': 'session', 'filename': 'session',
'arch': ['32bit', '64bit'], 'arch': ['32bit', '64bit'],
......
...@@ -41,6 +41,11 @@ FILES = [ ...@@ -41,6 +41,11 @@ FILES = [
'arch': ['32bit', '64bit'], 'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'], 'buildtype': ['dev', 'official'],
}, },
{
'filename': 'chrome_100_percent.pak',
'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'],
},
{ {
'filename': 'chrome_sandbox', 'filename': 'chrome_sandbox',
'arch': ['32bit', '64bit'], 'arch': ['32bit', '64bit'],
...@@ -86,16 +91,6 @@ FILES = [ ...@@ -86,16 +91,6 @@ FILES = [
'arch': ['32bit', '64bit'], 'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'], 'buildtype': ['dev', 'official'],
}, },
{
'filename': 'theme_resources_100_percent.pak',
'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'],
},
{
'filename': 'ui_resources_100_percent.pak',
'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'],
},
{ {
'filename': 'session', 'filename': 'session',
'arch': ['32bit', '64bit'], 'arch': ['32bit', '64bit'],
......
...@@ -69,6 +69,23 @@ FILES = [ ...@@ -69,6 +69,23 @@ FILES = [
'buildtype': ['dev', 'official'], 'buildtype': ['dev', 'official'],
'filegroup': ['default', 'symsrc'], 'filegroup': ['default', 'symsrc'],
}, },
{
'filename': 'chrome_100_percent.pak',
'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'],
},
{
'filename': 'chrome_200_percent.pak',
'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'],
'optional': ['dev', 'official'],
},
{
'filename': 'chrome_touch_100_percent.pak',
'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'],
'optional': ['dev', 'official'],
},
{ {
'filename': 'crash_service.exe', 'filename': 'crash_service.exe',
'arch': ['32bit', '64bit'], 'arch': ['32bit', '64bit'],
...@@ -350,40 +367,6 @@ FILES = [ ...@@ -350,40 +367,6 @@ FILES = [
'arch': ['32bit', '64bit'], 'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'], 'buildtype': ['dev', 'official'],
}, },
{
'filename': 'theme_resources_100_percent.pak',
'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'],
},
{
'filename': 'theme_resources_200_percent.pak',
'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'],
'optional': ['dev', 'official'],
},
{
'filename': 'theme_resources_touch_100_percent.pak',
'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'],
'optional': ['dev', 'official'],
},
{
'filename': 'ui_resources_100_percent.pak',
'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'],
},
{
'filename': 'ui_resources_200_percent.pak',
'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'],
'optional': ['dev', 'official'],
},
{
'filename': 'webkit_resources_200_percent.pak',
'arch': ['32bit', '64bit'],
'buildtype': ['dev', 'official'],
'optional': ['dev', 'official'],
},
{ {
'filename': 'wow_helper.exe', 'filename': 'wow_helper.exe',
'arch': ['32bit', '64bit'], 'arch': ['32bit', '64bit'],
......
...@@ -21,9 +21,7 @@ void ResourceBundle::LoadCommonResources() { ...@@ -21,9 +21,7 @@ void ResourceBundle::LoadCommonResources() {
PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &path); PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &path);
AddDataPackFromPath(path.AppendASCII("chrome.pak"), AddDataPackFromPath(path.AppendASCII("chrome.pak"),
SCALE_FACTOR_100P); SCALE_FACTOR_100P);
AddDataPackFromPath(path.AppendASCII("theme_resources_100_percent.pak"), AddDataPackFromPath(path.AppendASCII("chrome_100_percent.pak"),
SCALE_FACTOR_100P);
AddDataPackFromPath(path.AppendASCII("ui_resources_100_percent.pak"),
SCALE_FACTOR_100P); SCALE_FACTOR_100P);
} }
......
...@@ -45,41 +45,23 @@ void ResourceBundle::LoadCommonResources() { ...@@ -45,41 +45,23 @@ void ResourceBundle::LoadCommonResources() {
if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) { if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) {
// 1x touch // 1x touch
AddDataPackFromPath(GetResourcesPakFilePath( AddDataPackFromPath(GetResourcesPakFilePath(
"theme_resources_touch_100_percent.pak"), "chrome_touch_100_percent.pak"),
SCALE_FACTOR_100P);
AddDataPackFromPath(GetResourcesPakFilePath(
"ui_resources_touch_100_percent.pak"),
SCALE_FACTOR_100P); SCALE_FACTOR_100P);
if (ShouldLoad2xResources()) { if (ShouldLoad2xResources()) {
// 2x touch // 2x touch
AddDataPackFromPath(GetResourcesPakFilePath( AddDataPackFromPath(GetResourcesPakFilePath(
"theme_resources_touch_200_percent.pak"), "chrome_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); SCALE_FACTOR_200P);
} }
} else { } else {
// 1x non touch // 1x non touch
AddDataPackFromPath(GetResourcesPakFilePath( AddDataPackFromPath(GetResourcesPakFilePath(
"theme_resources_100_percent.pak"), "chrome_100_percent.pak"),
SCALE_FACTOR_100P);
AddDataPackFromPath(GetResourcesPakFilePath(
"ui_resources_100_percent.pak"),
SCALE_FACTOR_100P); SCALE_FACTOR_100P);
if (ShouldLoad2xResources()) { if (ShouldLoad2xResources()) {
// 2x non touch // 2x non touch
AddDataPackFromPath(GetResourcesPakFilePath( AddDataPackFromPath(GetResourcesPakFilePath(
"theme_resources_200_percent.pak"), "chrome_200_percent.pak"),
SCALE_FACTOR_200P);
AddDataPackFromPath(GetResourcesPakFilePath(
"ui_resources_200_percent.pak"),
SCALE_FACTOR_200P);
AddDataPackFromPath(GetResourcesPakFilePath(
"webkit_resources_200_percent.pak"),
SCALE_FACTOR_200P); SCALE_FACTOR_200P);
} }
} }
......
...@@ -68,10 +68,7 @@ void ResourceBundle::LoadCommonResources() { ...@@ -68,10 +68,7 @@ void ResourceBundle::LoadCommonResources() {
AddDataPackFromPath(GetResourcesPakFilePath("chrome.pak"), AddDataPackFromPath(GetResourcesPakFilePath("chrome.pak"),
SCALE_FACTOR_100P); SCALE_FACTOR_100P);
AddDataPackFromPath(GetResourcesPakFilePath( AddDataPackFromPath(GetResourcesPakFilePath(
"theme_resources_100_percent.pak"), "chrome_100_percent.pak"),
SCALE_FACTOR_100P);
AddDataPackFromPath(GetResourcesPakFilePath(
"ui_resources_100_percent.pak"),
SCALE_FACTOR_100P); SCALE_FACTOR_100P);
} }
......
...@@ -51,9 +51,7 @@ FilePath GetResourcesPakFilePath(NSString* name, NSString* mac_locale) { ...@@ -51,9 +51,7 @@ FilePath GetResourcesPakFilePath(NSString* name, NSString* mac_locale) {
void ResourceBundle::LoadCommonResources() { void ResourceBundle::LoadCommonResources() {
AddDataPackFromPath(GetResourcesPakFilePath(@"chrome", nil), AddDataPackFromPath(GetResourcesPakFilePath(@"chrome", nil),
SCALE_FACTOR_100P); SCALE_FACTOR_100P);
AddDataPackFromPath(GetResourcesPakFilePath(@"theme_resources_100_percent", AddDataPackFromPath(GetResourcesPakFilePath(@"chrome_100_percent",
nil), SCALE_FACTOR_100P);
AddDataPackFromPath(GetResourcesPakFilePath(@"ui_resources_100_percent",
nil), SCALE_FACTOR_100P); nil), SCALE_FACTOR_100P);
AddDataPackFromPath(GetResourcesPakFilePath(@"webkit_resources_100_percent", AddDataPackFromPath(GetResourcesPakFilePath(@"webkit_resources_100_percent",
nil), SCALE_FACTOR_100P); nil), SCALE_FACTOR_100P);
...@@ -62,9 +60,7 @@ void ResourceBundle::LoadCommonResources() { ...@@ -62,9 +60,7 @@ void ResourceBundle::LoadCommonResources() {
// On Mac we load both and let the UI framework decide which one to use. // On Mac we load both and let the UI framework decide which one to use.
#if defined(ENABLE_HIDPI) #if defined(ENABLE_HIDPI)
if (base::mac::IsOSLionOrLater()) { if (base::mac::IsOSLionOrLater()) {
AddDataPackFromPath(GetResourcesPakFilePath(@"theme_resources_200_percent", AddDataPackFromPath(GetResourcesPakFilePath(@"chrome_200_percent",
nil), SCALE_FACTOR_200P);
AddDataPackFromPath(GetResourcesPakFilePath(@"ui_resources_200_percent",
nil), SCALE_FACTOR_200P); nil), SCALE_FACTOR_200P);
AddDataPackFromPath(GetResourcesPakFilePath(@"webkit_resources_200_percent", AddDataPackFromPath(GetResourcesPakFilePath(@"webkit_resources_200_percent",
nil), SCALE_FACTOR_200P); nil), SCALE_FACTOR_200P);
......
...@@ -49,29 +49,20 @@ void ResourceBundle::LoadCommonResources() { ...@@ -49,29 +49,20 @@ void ResourceBundle::LoadCommonResources() {
switch (ui::GetDisplayLayout()) { switch (ui::GetDisplayLayout()) {
case ui::LAYOUT_TOUCH: case ui::LAYOUT_TOUCH:
AddDataPackFromPath( AddDataPackFromPath(
GetResourcesPakFilePath("theme_resources_touch_100_percent.pak"), GetResourcesPakFilePath("chrome_touch_100_percent.pak"),
SCALE_FACTOR_100P);
AddDataPackFromPath(
GetResourcesPakFilePath("ui_resources_100_percent.pak"),
SCALE_FACTOR_100P); SCALE_FACTOR_100P);
break; break;
default: default:
if (use_hidpi) { if (use_hidpi) {
AddDataPackFromPath(GetResourcesPakFilePath( AddDataPackFromPath(GetResourcesPakFilePath(
"theme_resources_200_percent.pak"), "chrome_200_percent.pak"),
SCALE_FACTOR_200P);
AddDataPackFromPath(GetResourcesPakFilePath(
"ui_resources_200_percent.pak"),
SCALE_FACTOR_200P); SCALE_FACTOR_200P);
AddDataPackFromPath(GetResourcesPakFilePath( AddDataPackFromPath(GetResourcesPakFilePath(
"webkit_resources_200_percent.pak"), "webkit_resources_200_percent.pak"),
SCALE_FACTOR_200P); SCALE_FACTOR_200P);
} else { } else {
AddDataPackFromPath( AddDataPackFromPath(
GetResourcesPakFilePath("theme_resources_100_percent.pak"), GetResourcesPakFilePath("chrome_100_percent.pak"),
SCALE_FACTOR_100P);
AddDataPackFromPath(
GetResourcesPakFilePath("ui_resources_100_percent.pak"),
SCALE_FACTOR_100P); SCALE_FACTOR_100P);
} }
break; break;
......
...@@ -59,7 +59,7 @@ void UITestSuite::Initialize() { ...@@ -59,7 +59,7 @@ void UITestSuite::Initialize() {
#if !defined(OS_MACOSX) && defined(OS_POSIX) #if !defined(OS_MACOSX) && defined(OS_POSIX)
ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath( ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
pak_dir.AppendASCII("ui_resources_100_percent.pak"), pak_dir.AppendASCII("chrome_100_percent.pak"),
ui::SCALE_FACTOR_100P); ui::SCALE_FACTOR_100P);
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment