Commit 27e7442d authored by rbpotter's avatar rbpotter Committed by Chromium LUCI CQ

Autogenerate grd for webrtc_logs

Bug: 1132403
Change-Id: Ia48978c88c7c4c04172ed7fc64a187cb4af37427
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2616880Reviewed-by: default avatarJohn Lee <johntlee@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841699}
parent 7ee420f2
...@@ -2,15 +2,32 @@ ...@@ -2,15 +2,32 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//chrome/common/features.gni")
import("//third_party/closure_compiler/compile_js.gni") import("//third_party/closure_compiler/compile_js.gni")
import("//tools/grit/grit_rule.gni") import("//tools/grit/grit_rule.gni")
import("//ui/webui/resources/tools/generate_grd.gni")
grit("webrtc_logs_resources") { generate_grd("build_grd") {
source = "webrtc_logs_resources.grd" grd_prefix = "webrtc_logs"
out_grd = "$target_gen_dir/webrtc_logs_resources.grd"
input_files = [
"webrtc_logs.css",
"webrtc_logs.html",
"webrtc_logs.js",
]
input_files_base_dir = rebase_path(".", "//")
}
grit("webrtc_logs_resources") {
source = "$target_gen_dir/webrtc_logs_resources.grd"
deps = [ ":build_grd" ]
enable_input_discovery_for_gn_analyze = false
defines = chrome_grit_defines
use_brotli = true use_brotli = true
outputs = [ outputs = [
"grit/webrtc_logs_resources.h", "grit/webrtc_logs_resources.h",
"grit/webrtc_logs_resources_map.cc",
"grit/webrtc_logs_resources_map.h",
"webrtc_logs_resources.pak", "webrtc_logs_resources.pak",
] ]
output_dir = "$root_gen_dir/chrome" output_dir = "$root_gen_dir/chrome"
......
<?xml version="1.0" encoding="UTF-8"?>
<grit latest_public_release="0"
current_release="1"
output_all_resource_defines="false">
<outputs>
<output filename="grit/webrtc_logs_resources.h" type="rc_header">
<emit emit_type="prepend"></emit>
</output>
<output filename="webrtc_logs_resources.pak" type="data_package" />
</outputs>
<release seq="1">
<includes>
<include name="IDR_WEBRTC_LOGS_HTML"
file="webrtc_logs.html"
flattenhtml="true"
allowexternalscript="true"
type="BINDATA" />
<include name="IDR_WEBRTC_LOGS_JS"
file="webrtc_logs.js"
type="BINDATA" />
</includes>
</release>
</grit>
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "chrome/common/url_constants.h" #include "chrome/common/url_constants.h"
#include "chrome/grit/generated_resources.h" #include "chrome/grit/generated_resources.h"
#include "chrome/grit/webrtc_logs_resources.h" #include "chrome/grit/webrtc_logs_resources.h"
#include "chrome/grit/webrtc_logs_resources_map.h"
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
#include "components/upload_list/upload_list.h" #include "components/upload_list/upload_list.h"
#include "components/version_info/version_info.h" #include "components/version_info/version_info.h"
...@@ -78,8 +79,9 @@ content::WebUIDataSource* CreateWebRtcLogsUIHTMLSource() { ...@@ -78,8 +79,9 @@ content::WebUIDataSource* CreateWebRtcLogsUIHTMLSource() {
AddLocalizedStringsBulk(source, kStrings); AddLocalizedStringsBulk(source, kStrings);
source->UseStringsJs(); source->UseStringsJs();
source->AddResourcePath("webrtc_logs.js", IDR_WEBRTC_LOGS_JS); webui::AddResourcePathsBulk(
source->SetDefaultResource(IDR_WEBRTC_LOGS_HTML); source, base::make_span(kWebrtcLogsResources, kWebrtcLogsResourcesSize));
source->SetDefaultResource(IDR_WEBRTC_LOGS_WEBRTC_LOGS_HTML);
return source; return source;
} }
......
...@@ -246,7 +246,8 @@ ...@@ -246,7 +246,8 @@
"META": {"sizes": {"includes": [10],}}, "META": {"sizes": {"includes": [10],}},
"includes": [2090], "includes": [2090],
}, },
"chrome/browser/resources/media/webrtc_logs_resources.grd": { "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/media/webrtc_logs_resources.grd": {
"META": {"sizes": {"includes": [10],}},
"includes": [2100], "includes": [2100],
}, },
"chrome/browser/resources/net_internals/net_internals_resources.grd": { "chrome/browser/resources/net_internals/net_internals_resources.grd": {
......
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