Skip to content

Commit

Permalink
Generate chrome_300_percent.pak
Browse files Browse the repository at this point in the history
This CL updates chrome/chrome_resources.gyp to generate the
chrome_300_percent.pak file (via the newly-added
chrome/chrome_repack_chrome_300_percent.gypi).

Several .grd files have been updated to generate the
*_300_percent.pak files that are used to create
chrome_300_percent.pak.

This CL doesn't add any assets but grit complains if the
necessary default_300_percent directories are not present
so this CL adds placeholder files in these directories until
real assets are added (which is tracked by crbug.com/423755).

Since there are no assets in the *_300_percent directories,
grit will fallback to using the 1x versions when generating the
*_300_percent.pak files.

Note that 300 percent support will be enabled in
ui/base/resources by a subsequent CL
(https://chromiumcodereview.appspot.com/646773004/).

BUG=423762

Review URL: https://codereview.chromium.org/633373010

Cr-Commit-Position: refs/heads/master@{#300869}
  • Loading branch information
lliabraa authored and Commit bot committed Oct 23, 2014
1 parent 14b90d5 commit ca09c95
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 0 deletions.
Empty file.
1 change: 1 addition & 0 deletions chrome/app/theme/theme_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<output filename="grit/theme_resources_map.h" type="resource_map_header" context="default_100_percent" />
<output filename="theme_resources_100_percent.pak" type="data_package" context="default_100_percent" />
<output filename="theme_resources_200_percent.pak" type="data_package" context="default_200_percent" />
<output filename="theme_resources_300_percent.pak" type="data_package" context="default_300_percent" />
</outputs>
<release seq="1">
<structures fallback_to_low_resolution="true">
Expand Down
1 change: 1 addition & 0 deletions chrome/chrome_ios_bundle_resources.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
'mac_bundle_resources': [
'<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/repack/chrome_200_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/repack/chrome_300_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak',
'<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))',
],
Expand Down
20 changes: 20 additions & 0 deletions chrome/chrome_repack_chrome_300_percent.gypi
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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.
{
# GN version: //chrome:repack_chrome_300_percent
'action_name': 'repack_chrome_resources_300_percent',
'variables': {
'pak_inputs': [
# Only iOS generates 300 percent pak files so the inputs will need to be
# updated if other platforms need 300 percent support.
'<(SHARED_INTERMEDIATE_DIR)/components/components_resources_300_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_300_percent.pak',
# TODO(ios): Remove the dependency on renderer_resources.
'<(grit_out_dir)/renderer_resources_300_percent.pak',
'<(grit_out_dir)/theme_resources_300_percent.pak',
],
'pak_output': '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_300_percent.pak',
},
'includes': [ '../build/repack_action.gypi' ],
}
10 changes: 10 additions & 0 deletions chrome/chrome_resources.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,16 @@
'<(DEPTH)/content/app/strings/content_strings.gyp:content_strings',
'<(DEPTH)/third_party/WebKit/public/blink_resources.gyp:blink_resources',
],
}, { # else
'actions': [
{
'conditions': [
['OS == "ios"', {
'includes': ['chrome_repack_chrome_300_percent.gypi']
}],
],
},
],
}],
['use_ash==1', {
'dependencies': [
Expand Down
Empty file.
1 change: 1 addition & 0 deletions chrome/renderer/resources/renderer_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
</output>
<output filename="renderer_resources_100_percent.pak" type="data_package" context="default_100_percent" />
<output filename="renderer_resources_200_percent.pak" type="data_package" context="default_200_percent" />
<output filename="renderer_resources_300_percent.pak" type="data_package" context="default_300_percent" />
</outputs>
<release seq="1">
<structures fallback_to_low_resolution="true">
Expand Down
1 change: 1 addition & 0 deletions components/resources/components_scaled_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
</output>
<output filename="components_resources_100_percent.pak" type="data_package" context="default_100_percent" />
<output filename="components_resources_200_percent.pak" type="data_package" context="default_200_percent" />
<output filename="components_resources_300_percent.pak" type="data_package" context="default_300_percent" />
</outputs>
<release seq="1">
<structures fallback_to_low_resolution="true">
Expand Down
Empty file.
Empty file.
1 change: 1 addition & 0 deletions ui/resources/ui_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<output filename="grit/ui_resources_map.h" type="resource_map_header" context="default_100_percent" />
<output filename="ui_resources_100_percent.pak" type="data_package" context="default_100_percent" />
<output filename="ui_resources_200_percent.pak" type="data_package" context="default_200_percent" />
<output filename="ui_resources_300_percent.pak" type="data_package" context="default_300_percent" />
</outputs>
<release seq="1">
<structures fallback_to_low_resolution="true">
Expand Down

0 comments on commit ca09c95

Please sign in to comment.