diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-13 20:19:59 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-13 20:19:59 +0000 |
commit | af2abee798d1ba9f60096e691e0215218a671043 (patch) | |
tree | 65730f1f78ee5ad5148f31821e349dbd93504880 | |
parent | 735ea7690f74557f645e55737903c9d5badbe932 (diff) | |
download | chromium_src-af2abee798d1ba9f60096e691e0215218a671043.zip chromium_src-af2abee798d1ba9f60096e691e0215218a671043.tar.gz chromium_src-af2abee798d1ba9f60096e691e0215218a671043.tar.bz2 |
Port remaining .rc data resource files to grd. This includes
debugger_resources.rc, common_resources.rc, and renderer_resources.rc.
Review URL: http://codereview.chromium.org/21307
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9784 0039d316-1c4b-4281-b951-d872f2087c98
26 files changed, 157 insertions, 138 deletions
diff --git a/chrome/SConscript b/chrome/SConscript index 2397999..884ee96 100644 --- a/chrome/SConscript +++ b/chrome/SConscript @@ -11,8 +11,6 @@ env_test = env.Clone() env = env.Clone() install_targets = [] -grit_files = [] - env.Prepend( CPPPATH = [ @@ -41,9 +39,12 @@ if env_res.Bit('windows'): chrome_exe_res = env_res.RES('app/chrome_exe.rc'), chrome_dll_res = env_res.RES('app/chrome_dll.rc') env_res.Depends(chrome_dll_res, 'installer/util/installer_util_strings.rc') - common_res = env_res.RES('common/common_resources.rc') - debugger_res = env_res.RES('browser/debugger/resources/debugger_resources.rc') - renderer_res = env_res.RES('renderer/renderer_resources.rc') + common_res = env_res.RES( + '$TARGET_ROOT/grit_derived_sources/common_resources.rc') + debugger_res = env_res.RES( + '$TARGET_ROOT/grit_derived_sources/debugger_resources.rc') + renderer_res = env_res.RES( + '$TARGET_ROOT/grit_derived_sources/renderer_resources.rc') test_data_res = env_res.RES('test/data/resource.rc') net_res = '$TARGET_ROOT/grit_derived_sources/net_resources.res' @@ -65,29 +66,26 @@ if env_res.Bit('windows'): env_grd = env.Clone() env_grd.Tool('scons', toolpath=[env_grd.Dir('$CHROME_SRC_DIR/tools/grit/grit')]) -# NOTE: fake target gets replaced with real targets from reading .grd -generated = env_grd.GRIT( - '$TARGET_ROOT/grit_derived_sources/fake_generated_target', - '$CHROME_SRC_DIR/chrome/app/generated_resources.grd') -grit_files.extend(generated) - -# NOTE: fake target gets replaced with real targets from reading .grd -chromium = env_grd.GRIT( - '$TARGET_ROOT/grit_derived_sources/fake_chromium_target', - '$CHROME_SRC_DIR/chrome/app/chromium_strings.grd') -grit_files.extend(chromium) - -# NOTE: fake target gets replaced with real targets from reading .grd -google_chrome = env_grd.GRIT( - '$TARGET_ROOT/grit_derived_sources/fake_google_chrome_target', - '$CHROME_SRC_DIR/chrome/app/google_chrome_strings.grd') -grit_files.extend(google_chrome) - -# NOTE: fake target gets replaced with real targets from reading .grd -browser_resources = env_grd.GRIT( - '$TARGET_ROOT/grit_derived_sources/fake_browser_target', - '$CHROME_SRC_DIR/chrome/browser/browser_resources.grd') -grit_files.extend(browser_resources) +grd_files = [ + # Strings + '$CHROME_SRC_DIR/chrome/app/generated_resources.grd', + '$CHROME_SRC_DIR/chrome/app/chromium_strings.grd', + '$CHROME_SRC_DIR/chrome/app/google_chrome_strings.grd', + + # Data resources + '$CHROME_SRC_DIR/chrome/browser/browser_resources.grd', + '$CHROME_SRC_DIR/chrome/browser/debugger/resources/debugger_resources.grd', + '$CHROME_SRC_DIR/chrome/common/common_resources.grd', + '$CHROME_SRC_DIR/chrome/renderer/renderer_resources.grd', +] +grit_files = [] + +for grd_file in grd_files: + # NOTE: fake target gets replaced with real targets from reading .grd + generated = env_grd.GRIT( + '$TARGET_ROOT/grit_derived_sources/fake_' + os.path.basename(grd_file), + grd_file) + grit_files.extend(generated) input_files = ChromeFileList([ 'app/generated_resources.grd', diff --git a/chrome/app/chrome_dll.vcproj b/chrome/app/chrome_dll.vcproj index 87135dd..7276e53 100644 --- a/chrome/app/chrome_dll.vcproj +++ b/chrome/app/chrome_dll.vcproj @@ -196,11 +196,7 @@ > </File> <File - RelativePath="..\common\common_resources.h" - > - </File> - <File - RelativePath="..\common\common_resources.rc" + RelativePath="$(OutDir)\grit_derived_sources\common_resources.rc" > </File> <File @@ -208,11 +204,7 @@ > </File> <File - RelativePath="..\browser\debugger\resources\debugger_resources.h" - > - </File> - <File - RelativePath="..\browser\debugger\resources\debugger_resources.rc" + RelativePath="$(OutDir)\grit_derived_sources\debugger_resources.rc" > </File> <File @@ -220,11 +212,7 @@ > </File> <File - RelativePath="..\renderer\renderer_resources.h" - > - </File> - <File - RelativePath="..\renderer\renderer_resources.rc" + RelativePath="$(OutDir)\grit_derived_sources\renderer_resources.rc" > </File> <File diff --git a/chrome/app/chrome_dll_resource.h b/chrome/app/chrome_dll_resource.h index 855a370..a720c68 100644 --- a/chrome/app/chrome_dll_resource.h +++ b/chrome/app/chrome_dll_resource.h @@ -5,14 +5,9 @@ #define IDR_MAINFRAME 101 -// Values around 200 are used by browser/browser_resources.h -// Values around 300 are used by common/common_resources.h -// Values around 500 are used by renderer/renderer_resources.h - #define IDR_SAD_PLUGIN 1000 // Values around 1600 are used by installer/setup/build/ -// Values around 2000 are used by webkit/glue/webkit_resources.h #define IDD_IPC_SETTINGS 3000 diff --git a/chrome/app/chrome_resources.vcproj b/chrome/app/chrome_resources.vcproj index ca2ea2e..fa7acc9 100644 --- a/chrome/app/chrome_resources.vcproj +++ b/chrome/app/chrome_resources.vcproj @@ -73,6 +73,18 @@ > </File> <File + RelativePath="$(OutDir)\grit_derived_sources\common_resources.h" + > + </File> + <File + RelativePath="$(OutDir)\grit_derived_sources\debugger_resources.h" + > + </File> + <File + RelativePath="$(OutDir)\grit_derived_sources\renderer_resources.h" + > + </File> + <File RelativePath="$(OutDir)\grit_derived_sources\theme_resources.h" > </File> @@ -82,6 +94,18 @@ > </File> <File + RelativePath="..\common\common_resources.grd" + > + </File> + <File + RelativePath="..\browser\debugger\resources\debugger_resources.grd" + > + </File> + <File + RelativePath="..\renderer\renderer_resources.grd" + > + </File> + <File RelativePath="theme\theme_resources.grd" > </File> diff --git a/chrome/browser/debugger/debugger.vcproj b/chrome/browser/debugger/debugger.vcproj index 2ef5241..d72b86a 100644 --- a/chrome/browser/debugger/debugger.vcproj +++ b/chrome/browser/debugger/debugger.vcproj @@ -190,10 +190,6 @@ > </File> <File - RelativePath=".\resources\debugger_resources.h" - > - </File> - <File RelativePath=".\debugger_view.cc" > </File> diff --git a/chrome/browser/debugger/debugger_contents.cc b/chrome/browser/debugger/debugger_contents.cc index f861168..1c426f8 100644 --- a/chrome/browser/debugger/debugger_contents.cc +++ b/chrome/browser/debugger/debugger_contents.cc @@ -11,12 +11,13 @@ #include "chrome/browser/debugger/debugger_contents.h" #include "chrome/browser/debugger/debugger_shell.h" #include "chrome/browser/debugger/debugger_wrapper.h" -#include "chrome/browser/debugger/resources/debugger_resources.h" #include "chrome/browser/dom_ui/chrome_url_data_manager.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/resource_bundle.h" #include "net/base/mime_util.h" +#include "grit/debugger_resources.h" + class DebuggerHTMLSource : public ChromeURLDataManager::DataSource { public: // Creates our datasource and sets our user message to a specific message diff --git a/chrome/browser/debugger/debugger_shell.cc b/chrome/browser/debugger/debugger_shell.cc index 64b4887..ec7d6c4 100644 --- a/chrome/browser/debugger/debugger_shell.cc +++ b/chrome/browser/debugger/debugger_shell.cc @@ -15,11 +15,12 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/debugger/debugger_io.h" #include "chrome/browser/debugger/debugger_node.h" -#include "chrome/browser/debugger/resources/debugger_resources.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/resource_bundle.h" +#include "grit/debugger_resources.h" + #if defined(OS_WIN) #include "chrome/browser/tab_contents/tab_contents.h" #elif defined(OS_POSIX) diff --git a/chrome/browser/debugger/debugger_view.cc b/chrome/browser/debugger/debugger_view.cc index 18a8104..25ee191 100644 --- a/chrome/browser/debugger/debugger_view.cc +++ b/chrome/browser/debugger/debugger_view.cc @@ -10,7 +10,6 @@ #include "base/values.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/browser_process.h" -#include "chrome/browser/debugger/resources/debugger_resources.h" #include "chrome/browser/debugger/debugger_shell.h" #include "chrome/browser/debugger/debugger_view.h" #include "chrome/browser/debugger/debugger_wrapper.h" @@ -29,6 +28,7 @@ #include "chrome/views/text_field.h" #include "chrome/views/view.h" +#include "grit/debugger_resources.h" DebuggerView::DebuggerView() : output_ready_(false) { web_container_ = new TabContentsContainerView(); diff --git a/chrome/browser/debugger/resources/debugger_resources.grd b/chrome/browser/debugger/resources/debugger_resources.grd new file mode 100755 index 0000000..37bf7a3 --- /dev/null +++ b/chrome/browser/debugger/resources/debugger_resources.grd @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<grit latest_public_release="0" current_release="1"> + <outputs> + <output filename="debugger_resources.h" type="rc_header"> + <emit emit_type='prepend'></emit> + </output> + <output filename="debugger_resources.rc" type="rc_all" /> + <output filename="debugger_resources.pak" type="data_package" /> + </outputs> + <release seq="1"> + <includes> + <include name="IDR_DEBUGGER_SHELL_JS" file="debugger_shell.js" type="BINDATA" /> + <include name="IDR_DEBUGGER_HTML" file="debugger.html" type="BINDATA" /> + <include name="IDR_DEBUGGER_CSS" file="debugger.css" type="BINDATA" /> + <include name="IDR_DEBUGGER_JS" file="debugger.js" type="BINDATA" /> + </includes> + </release> +</grit>
\ No newline at end of file diff --git a/chrome/browser/debugger/resources/debugger_resources.h b/chrome/browser/debugger/resources/debugger_resources.h deleted file mode 100644 index 0dbf643..0000000 --- a/chrome/browser/debugger/resources/debugger_resources.h +++ /dev/null @@ -1,6 +0,0 @@ -// TODO(tc): Come up with a way to automate the generation of these -// IDs so they don't collide with other rc files. -#define IDR_DEBUGGER_SHELL_JS 600 -#define IDR_DEBUGGER_HTML 601 -#define IDR_DEBUGGER_CSS 602 -#define IDR_DEBUGGER_JS 603 diff --git a/chrome/browser/debugger/resources/debugger_resources.rc b/chrome/browser/debugger/resources/debugger_resources.rc deleted file mode 100644 index 13c2e87..0000000 --- a/chrome/browser/debugger/resources/debugger_resources.rc +++ /dev/null @@ -1,19 +0,0 @@ -// Resources used by browser/debugger/*.
-//
-// Paths in this file are relative to SolutionDir.
-
-#ifdef APSTUDIO_INVOKED
- #error // Don't open in the Visual Studio resource editor!
-#endif //APSTUDIO_INVOKED
-
-#include "browser\\debugger\\resources\\debugger_resources.h"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// data resources
-//
-
-IDR_DEBUGGER_SHELL_JS BINDATA "browser\\debugger\\resources\\debugger_shell.js"
-IDR_DEBUGGER_HTML BINDATA "browser\\debugger\\resources\\debugger.html"
-IDR_DEBUGGER_CSS BINDATA "browser\\debugger\\resources\\debugger.css"
-IDR_DEBUGGER_JS BINDATA "browser\\debugger\\resources\\debugger.js"
diff --git a/chrome/chrome.sln b/chrome/chrome.sln index 173a45f..8714096 100644 --- a/chrome/chrome.sln +++ b/chrome/chrome.sln @@ -31,6 +31,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "renderer", "renderer\render EndProjectSection ProjectSection(ProjectDependencies) = postProject {6AE76406-B03B-11DD-94B1-80B556D89593} = {6AE76406-B03B-11DD-94B1-80B556D89593} + {B95AB527-F7DB-41E9-AD91-EB51EE0F56BE} = {B95AB527-F7DB-41E9-AD91-EB51EE0F56BE} {D9DDAF60-663F-49CC-90DC-3D08CC3D1B28} = {D9DDAF60-663F-49CC-90DC-3D08CC3D1B28} EndProjectSection EndProject @@ -52,6 +53,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "common\common.vcp Release.AspNetCompiler.Debug = "False" EndProjectSection ProjectSection(ProjectDependencies) = postProject + {B95AB527-F7DB-41E9-AD91-EB51EE0F56BE} = {B95AB527-F7DB-41E9-AD91-EB51EE0F56BE} {D9DDAF60-663F-49CC-90DC-3D08CC3D1B28} = {D9DDAF60-663F-49CC-90DC-3D08CC3D1B28} EndProjectSection EndProject @@ -1738,6 +1740,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "debugger", "browser\debugge Release.AspNetCompiler.Debug = "False" EndProjectSection ProjectSection(ProjectDependencies) = postProject + {B95AB527-F7DB-41E9-AD91-EB51EE0F56BE} = {B95AB527-F7DB-41E9-AD91-EB51EE0F56BE} {D9DDAF60-663F-49CC-90DC-3D08CC3D1B28} = {D9DDAF60-663F-49CC-90DC-3D08CC3D1B28} EndProjectSection EndProject diff --git a/chrome/chrome.xcodeproj/generate_headers.sh b/chrome/chrome.xcodeproj/generate_headers.sh index 2f137e4..775d4e5 100755 --- a/chrome/chrome.xcodeproj/generate_headers.sh +++ b/chrome/chrome.xcodeproj/generate_headers.sh @@ -48,3 +48,33 @@ then -i "${PROJECT_DIR}/app/theme/theme_resources.grd" build \ -o "${GRIT_DIR}" fi + +# compare common_resources.grd to common_resources.h. If the .h is +# older or doesn't exist, rebuild it +if [ "${GRIT_DIR}/grit/common_resources.h" -ot \ + "${PROJECT_DIR}/common/common_resources.grd" ] +then + python "${PROJECT_DIR}/../tools/grit/grit.py" \ + -i "${PROJECT_DIR}/common/common_resources.grd" build \ + -o "${GRIT_DIR}" +fi + +# compare renderer_resources.grd to renderer_resources.h. If the .h is +# older or doesn't exist, rebuild it +if [ "${GRIT_DIR}/grit/renderer_resources.h" -ot \ + "${PROJECT_DIR}/renderer/renderer_resources.grd" ] +then + python "${PROJECT_DIR}/../tools/grit/grit.py" \ + -i "${PROJECT_DIR}/renderer/renderer_resources.grd" build \ + -o "${GRIT_DIR}" +fi + +# compare debugger_resources.grd to debugger_resources.h. If the .h is +# older or doesn't exist, rebuild it +if [ "${GRIT_DIR}/grit/debugger_resources.h" -ot \ + "${PROJECT_DIR}/browser/debugger/resources/debugger_resources.grd" ] +then + python "${PROJECT_DIR}/../tools/grit/grit.py" \ + -i "${PROJECT_DIR}/browser/debugger/debugger/debugger_resources.grd" build \ + -o "${GRIT_DIR}" +fi diff --git a/chrome/chrome_kjs.sln b/chrome/chrome_kjs.sln index 80021f0..2af390d 100644 --- a/chrome/chrome_kjs.sln +++ b/chrome/chrome_kjs.sln @@ -30,6 +30,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "renderer", "renderer\render Release.AspNetCompiler.Debug = "False" EndProjectSection ProjectSection(ProjectDependencies) = postProject + {B95AB527-F7DB-41E9-AD91-EB51EE0F56BE} = {B95AB527-F7DB-41E9-AD91-EB51EE0F56BE} {D9DDAF60-663F-49CC-90DC-3D08CC3D1B28} = {D9DDAF60-663F-49CC-90DC-3D08CC3D1B28} EndProjectSection EndProject @@ -51,6 +52,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "common\common.vcp Release.AspNetCompiler.Debug = "False" EndProjectSection ProjectSection(ProjectDependencies) = postProject + {B95AB527-F7DB-41E9-AD91-EB51EE0F56BE} = {B95AB527-F7DB-41E9-AD91-EB51EE0F56BE} {D9DDAF60-663F-49CC-90DC-3D08CC3D1B28} = {D9DDAF60-663F-49CC-90DC-3D08CC3D1B28} {F9810DE8-CBC3-4605-A7B1-ECA2D5292FD7} = {F9810DE8-CBC3-4605-A7B1-ECA2D5292FD7} EndProjectSection @@ -1648,6 +1650,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "debugger_disabled", "browse Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.Debug = "False" EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {B95AB527-F7DB-41E9-AD91-EB51EE0F56BE} = {B95AB527-F7DB-41E9-AD91-EB51EE0F56BE} + {D9DDAF60-663F-49CC-90DC-3D08CC3D1B28} = {D9DDAF60-663F-49CC-90DC-3D08CC3D1B28} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "browser_views", "browser\views\browser_views.vcproj", "{FA537565-7B03-4FFC-AF15-F7A979B72E22}" ProjectSection(WebsiteProperties) = preProject diff --git a/chrome/common/common.vcproj b/chrome/common/common.vcproj index 00282224..283ab6e 100644 --- a/chrome/common/common.vcproj +++ b/chrome/common/common.vcproj @@ -434,10 +434,6 @@ > </File> <File - RelativePath=".\common_resources.h" - > - </File> - <File RelativePath=".\debug_flags.cc" > </File> diff --git a/chrome/common/common_resources.grd b/chrome/common/common_resources.grd new file mode 100755 index 0000000..07ccf1d --- /dev/null +++ b/chrome/common/common_resources.grd @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<grit latest_public_release="0" current_release="1"> + <outputs> + <output filename="common_resources.h" type="rc_header"> + <emit emit_type='prepend'></emit> + </output> + <output filename="common_resources.rc" type="rc_all" /> + <output filename="common_resources.pak" type="data_package" /> + </outputs> + <release seq="1"> + <includes> + <include name="IDR_JSTEMPLATE_JS" file="..\third_party\jstemplate\jstemplate_compiled.js" type="BINDATA" /> + </includes> + </release> +</grit>
\ No newline at end of file diff --git a/chrome/common/common_resources.h b/chrome/common/common_resources.h deleted file mode 100644 index 9ec89db..0000000 --- a/chrome/common/common_resources.h +++ /dev/null @@ -1,3 +0,0 @@ -// TODO(tc): Come up with a way to automate the generation of these -// IDs so they don't collide with other rc files. -#define IDR_JSTEMPLATE_JS 300 diff --git a/chrome/common/common_resources.rc b/chrome/common/common_resources.rc deleted file mode 100644 index 0a8690b..0000000 --- a/chrome/common/common_resources.rc +++ /dev/null @@ -1,16 +0,0 @@ -// Resources used by common/*. -// -// Paths in this file are relative to SolutionDir. - -#ifdef APSTUDIO_INVOKED - #error // Don't open in the Visual Studio resource editor! -#endif //APSTUDIO_INVOKED - -#include "common\\common_resources.h" - -///////////////////////////////////////////////////////////////////////////// -// -// data resources -// - -IDR_JSTEMPLATE_JS BINDATA "third_party\\jstemplate\\jstemplate_compiled.js" diff --git a/chrome/common/jstemplate_builder.cc b/chrome/common/jstemplate_builder.cc index 8bba0b7..49772db 100644 --- a/chrome/common/jstemplate_builder.cc +++ b/chrome/common/jstemplate_builder.cc @@ -7,11 +7,12 @@ #include "chrome/common/jstemplate_builder.h" -#include "chrome/common/common_resources.h" -#include "chrome/common/json_value_serializer.h" #include "base/logging.h" -#include "chrome/common/resource_bundle.h" #include "base/string_util.h" +#include "chrome/common/json_value_serializer.h" +#include "chrome/common/resource_bundle.h" + +#include "grit/common_resources.h" namespace jstemplate_builder { diff --git a/chrome/common/security_filter_peer.cc b/chrome/common/security_filter_peer.cc index e984bc4..94adb8e 100644 --- a/chrome/common/security_filter_peer.cc +++ b/chrome/common/security_filter_peer.cc @@ -11,13 +11,14 @@ #include "net/http/http_response_headers.h" #include "chrome/common/l10n_util.h" #include "chrome/common/resource_bundle.h" -#include "chrome/renderer/renderer_resources.h" #include "generated_resources.h" #include "skia/include/SkBitmap.h" #include "skia/include/SkCanvas.h" #include "webkit/glue/webkit_glue.h" #include "SkDevice.h" +#include "grit/renderer_resources.h" + SecurityFilterPeer::SecurityFilterPeer( webkit_glue::ResourceLoaderBridge* resource_loader_bridge, webkit_glue::ResourceLoaderBridge::Peer* peer) diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index b8bd897..bbe14c4 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -27,7 +27,6 @@ #include "chrome/renderer/debug_message_handler.h" #include "chrome/renderer/localized_error.h" #include "chrome/renderer/render_process.h" -#include "chrome/renderer/renderer_resources.h" #include "chrome/renderer/user_script_slave.h" #include "chrome/renderer/visitedlink_slave.h" #include "chrome/renderer/webmediaplayer_delegate_impl.h" @@ -57,6 +56,7 @@ #include "webkit/glue/webview.h" #include "generated_resources.h" +#include "grit/renderer_resources.h" #if defined(OS_WIN) // TODO(port): these files are currently Windows only because they concern: diff --git a/chrome/renderer/renderer.vcproj b/chrome/renderer/renderer.vcproj index 289fc28..7e50f8f 100644 --- a/chrome/renderer/renderer.vcproj +++ b/chrome/renderer/renderer.vcproj @@ -310,10 +310,6 @@ > </File> <File - RelativePath=".\renderer_resources.h" - > - </File> - <File RelativePath=".\user_script_slave.cc" > </File> diff --git a/chrome/renderer/renderer_resources.grd b/chrome/renderer/renderer_resources.grd new file mode 100755 index 0000000..30b7d65 --- /dev/null +++ b/chrome/renderer/renderer_resources.grd @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<grit latest_public_release="0" current_release="1"> + <outputs> + <output filename="renderer_resources.h" type="rc_header"> + <emit emit_type='prepend'></emit> + </output> + <output filename="renderer_resources.rc" type="rc_all" /> + <output filename="renderer_resources.pak" type="data_package" /> + </outputs> + <release seq="1"> + <includes> + <include name="IDR_NET_ERROR_HTML" file="resources\neterror.html" type="BINDATA" /> + <include name="IDR_INSECURE_CONTENT_STAMP" file="resources\insecure_content_stamp.png" type="BINDATA" /> + <include name="IDR_ERROR_NO_DETAILS_HTML" file="resources\error_no_details.html" type="BINDATA" /> + <include name="IDR_GREASEMONKEY_API_JS" file="resources\greasemonkey_api.js" type="BINDATA" /> + </includes> + </release> +</grit>
\ No newline at end of file diff --git a/chrome/renderer/renderer_resources.h b/chrome/renderer/renderer_resources.h deleted file mode 100644 index 06bff27..0000000 --- a/chrome/renderer/renderer_resources.h +++ /dev/null @@ -1,6 +0,0 @@ -// TODO(tc): Come up with a way to automate the generation of these -// IDs so they don't collide with other rc files. -#define IDR_NET_ERROR_HTML 500 -#define IDR_INSECURE_CONTENT_STAMP 501 -#define IDR_ERROR_NO_DETAILS_HTML 502 -#define IDR_GREASEMONKEY_API_JS 503 diff --git a/chrome/renderer/renderer_resources.rc b/chrome/renderer/renderer_resources.rc deleted file mode 100644 index 13cbe75..0000000 --- a/chrome/renderer/renderer_resources.rc +++ /dev/null @@ -1,19 +0,0 @@ -// Resources used by renderer/*. -// -// Paths in this file are relative to SolutionDir. - -#ifdef APSTUDIO_INVOKED - #error // Don't open in the Visual Studio resource editor! -#endif //APSTUDIO_INVOKED - -#include "renderer\\renderer_resources.h" - -///////////////////////////////////////////////////////////////////////////// -// -// data resources -// - -IDR_NET_ERROR_HTML BINDATA "renderer\\resources\\neterror.html" -IDR_INSECURE_CONTENT_STAMP BINDATA "renderer\\resources\\insecure_content_stamp.png" -IDR_ERROR_NO_DETAILS_HTML BINDATA "renderer\\resources\\error_no_details.html" -IDR_GREASEMONKEY_API_JS BINDATA "renderer\\resources\\greasemonkey_api.js" diff --git a/chrome/renderer/user_script_slave.cc b/chrome/renderer/user_script_slave.cc index 0e64a17..8fc1e3a 100644 --- a/chrome/renderer/user_script_slave.cc +++ b/chrome/renderer/user_script_slave.cc @@ -8,10 +8,11 @@ #include "base/pickle.h" #include "base/shared_memory.h" #include "chrome/common/resource_bundle.h" -#include "chrome/renderer/renderer_resources.h" #include "googleurl/src/gurl.h" #include "webkit/glue/webframe.h" +#include "grit/renderer_resources.h" + // These two strings are injected before and after the Greasemonkey API and // user script to wrap it in an anonymous scope. static const char kUserScriptHead[] = "(function (unsafeWindow) {\n"; |