diff options
author | Hokein.Wu@gmail.com <Hokein.Wu@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-21 14:55:34 +0000 |
---|---|---|
committer | Hokein.Wu@gmail.com <Hokein.Wu@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-21 14:55:34 +0000 |
commit | 5757fccc8a95b30fff3fe86575181cf4c35a4b0a (patch) | |
tree | 9f4ce4f617841c66d91360db37cbdcdad2180c3c /apps | |
parent | 9ccaba17bbc6bbcc9876f50d17ca67effda43928 (diff) | |
download | chromium_src-5757fccc8a95b30fff3fe86575181cf4c35a4b0a.zip chromium_src-5757fccc8a95b30fff3fe86575181cf4c35a4b0a.tar.gz chromium_src-5757fccc8a95b30fff3fe86575181cf4c35a4b0a.tar.bz2 |
[App Shell] Introduce app_shell.pak
This patch is to introduce an app_shell.pak to include dev-tools
needed resources, instead of entire content_shell.pak.
Next step: Also include chrome-specific needed resources and removing
chrome resources.pak.
BUG=344974
TEST=launch app_shell with '--remote-debugging-port', and open the
debug page.
Review URL: https://codereview.chromium.org/173883002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252553 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps')
-rw-r--r-- | apps/apps.gypi | 30 | ||||
-rw-r--r-- | apps/shell/app/shell_main_delegate.cc | 8 |
2 files changed, 33 insertions, 5 deletions
diff --git a/apps/apps.gypi b/apps/apps.gypi index 78dcd5f..9953f67 100644 --- a/apps/apps.gypi +++ b/apps/apps.gypi @@ -100,6 +100,35 @@ ['chromeos==1 or (OS=="linux" and use_aura==1) or (OS=="win" and use_aura==1)', { 'targets': [ { + 'target_name': 'app_shell_pak', + 'type': 'none', + 'dependencies': [ + '../content/content_shell_and_tests.gyp:generate_content_shell_resources', + ], + 'variables': { + 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py', + }, + 'actions': [ + { + 'action_name': 'repack_app_shell_pack', + 'variables': { + 'pak_inputs': [ + '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak', + ], + }, + 'inputs': [ + '<(repack_path)', + '<@(pak_inputs)', + ], + 'outputs': [ + '<(PRODUCT_DIR)/app_shell.pak', + ], + 'action': ['python', '<(repack_path)', '<@(_outputs)', + '<@(pak_inputs)'], + }, + ], + }, + { 'target_name': 'app_shell', 'type': 'executable', 'defines!': ['CONTENT_IMPLEMENTATION'], @@ -107,6 +136,7 @@ 'chromium_code': 1, }, 'dependencies': [ + 'app_shell_pak', 'apps', 'chrome_resources.gyp:packed_resources', # For resources.pak for features JSON files. diff --git a/apps/shell/app/shell_main_delegate.cc b/apps/shell/app/shell_main_delegate.cc index bd8e0cf..905ffd5 100644 --- a/apps/shell/app/shell_main_delegate.cc +++ b/apps/shell/app/shell_main_delegate.cc @@ -97,13 +97,11 @@ void ShellMainDelegate::InitializeResourceBundle() { PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); ResourceBundle::GetSharedInstance().AddDataPackFromPath( resources_pack_path, ui::SCALE_FACTOR_NONE); - // The dev tool needs shell_devtools_discovery_page.html from - // content_shell.pak file. - base::FilePath pak_file, pak_dir; + base::FilePath pak_dir; PathService::Get(base::DIR_MODULE, &pak_dir); - pak_file = pak_dir.Append(FILE_PATH_LITERAL("content_shell.pak")); ResourceBundle::GetSharedInstance().AddDataPackFromPath( - pak_file, ui::SCALE_FACTOR_NONE); + pak_dir.Append(FILE_PATH_LITERAL("app_shell.pak")), + ui::SCALE_FACTOR_NONE); } } // namespace apps |