diff options
author | Pierre Rossi <pierre.rossi@digia.com> | 2014-06-17 16:15:35 +0200 |
---|---|---|
committer | Pierre Rossi <pierre.rossi@gmail.com> | 2014-08-04 17:22:42 +0200 |
commit | 7d90b44187cfa8f93df6a6341da41cf8192d18ad (patch) | |
tree | 47384a6837549df6c80759ae270bbd8651477bde /src/core/resources | |
parent | 35d66ce48248f07759cbe2a17437198e8e1948ed (diff) |
Expose better error information in loadRequest.
Use the chromium localized error strings for that purpose, otherwise the
error description is always empty.
While we're at it, let's tap into the chromium error pages, which should
hopefully make sense for most errors, and add some static asserts to
check that the qt quick enum and the core one are in sync.
Change-Id: Icf8fa7c3bf4a674c60a10950422135fb6930447a
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'src/core/resources')
-rw-r--r-- | src/core/resources/grit_action.gypi | 41 | ||||
-rw-r--r-- | src/core/resources/repack_locales.gypi | 1 | ||||
-rw-r--r-- | src/core/resources/repack_resources.gypi | 2 | ||||
-rw-r--r-- | src/core/resources/resources.gyp | 1 |
4 files changed, 43 insertions, 2 deletions
diff --git a/src/core/resources/grit_action.gypi b/src/core/resources/grit_action.gypi new file mode 100644 index 000000000..e8b98b43d --- /dev/null +++ b/src/core/resources/grit_action.gypi @@ -0,0 +1,41 @@ +# Copyright (c) 2011 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. + +# This file is meant to be included into an action to invoke grit in a +# consistent manner. To use this the following variables need to be +# defined: +# grit_grd_file: string: grd file path +# grit_out_dir: string: the output directory path + +# It would be really nice to do this with a rule instead of actions, but it +# would need to determine inputs and outputs via grit_info on a per-file +# basis. GYP rules don’t currently support that. They could be extended to +# do this, but then every generator would need to be updated to handle this. + +{ + 'variables': { + 'grit_cmd': ['python', '<(DEPTH)/tools/grit/grit.py'], + 'grit_resource_ids%': '<(DEPTH)/tools/gritsettings/resource_ids', + # This makes it possible to add more defines in specific targets, + # instead of build/common.gypi . + 'grit_additional_defines%': [], + }, + 'inputs': [ + '<!@pymod_do_main(grit_info <@(grit_defines) <@(grit_additional_defines) ' + '--inputs <(grit_grd_file) -f "<(grit_resource_ids)")', + ], + 'outputs': [ + '<!@pymod_do_main(grit_info <@(grit_defines) <@(grit_additional_defines) ' + '--outputs \'<(grit_out_dir)\' ' + '<(grit_grd_file) -f "<(grit_resource_ids)")', + ], + 'action': ['<@(grit_cmd)', + '-i', '<(grit_grd_file)', 'build', + '-f', '<(grit_resource_ids)', + '-o', '<(grit_out_dir)', + '<@(grit_defines)', + '<@(grit_additional_defines)' ], + 'msvs_cygwin_shell': 0, + 'message': 'Generating resources from <(grit_grd_file)', +} diff --git a/src/core/resources/repack_locales.gypi b/src/core/resources/repack_locales.gypi index e906d2178..ca3507912 100644 --- a/src/core/resources/repack_locales.gypi +++ b/src/core/resources/repack_locales.gypi @@ -3,7 +3,6 @@ # found in the LICENSE file. { - 'action_name': 'repack_locales', 'variables': { 'repack_extra_flags%': [], 'repack_output_dir%': '<(SHARED_INTERMEDIATE_DIR)', diff --git a/src/core/resources/repack_resources.gypi b/src/core/resources/repack_resources.gypi index 5a955cccc..133813c60 100644 --- a/src/core/resources/repack_resources.gypi +++ b/src/core/resources/repack_resources.gypi @@ -2,7 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { - 'action_name': 'repack_resources', 'variables': { 'repack_path': '<(chromium_src_dir)/tools/grit/grit/format/repack.py', 'pak_inputs': [ @@ -13,6 +12,7 @@ '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak', '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/webui_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources_100_percent.pak', ], }, 'inputs': [ diff --git a/src/core/resources/resources.gyp b/src/core/resources/resources.gyp index 44ffcd703..f07facca6 100644 --- a/src/core/resources/resources.gyp +++ b/src/core/resources/resources.gyp @@ -14,6 +14,7 @@ '<(chromium_src_dir)/webkit/webkit_resources.gyp:webkit_strings', '<(chromium_src_dir)/webkit/webkit_resources.gyp:webkit_resources', '<(chromium_src_dir)/content/browser/devtools/devtools_resources.gyp:devtools_resources', + '../chrome_qt.gyp:chrome_resources', ], 'targets': [ { |