Commit d8f0cfa1 authored by Ian Vollick's avatar Ian Vollick Committed by Commit Bot

[vr] resources should be included if enable_vr, not is_android

Previously, vr_shell_resources.grdp contained a condition that it be
included if enable_vr, but in browser_resources.grd we only included
this part if is_android. This allows vr_common_unittests to build on
linux when enable_vr is true.

We will eventually want to, for tests, use generic assets for the
controller (see crbug.com/743687), but this lets us test on linux
in the interim.

This change also relocates our resources to a more appropriate
location.

Bug: None
Change-Id: Ic17545487555595a867913fa58b74e559b26391d
Reviewed-on: https://chromium-review.googlesource.com/572943
Commit-Queue: Ian Vollick <vollick@chromium.org>
Reviewed-by: default avatarTibor Goldschwendt <tiborg@chromium.org>
Reviewed-by: default avatarMichael Thiessen <mthiesse@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487190}
parent 179769cf
......@@ -48,7 +48,6 @@ static_library("vr_android") {
":vr_shell_jni_headers",
"//base",
"//cc",
"//chrome:resources",
"//chrome/browser/vr:vr_common",
"//components/rappor",
"//content/public/android:jni",
......
......@@ -235,7 +235,6 @@
<include name="IDR_SNIPPETS_INTERNALS_HTML" file="resources\snippets_internals.html" allowexternalscript="true" compress="gzip" type="BINDATA" />
<include name="IDR_SNIPPETS_INTERNALS_CSS" file="resources\snippets_internals.css" compress="gzip" type="BINDATA" />
<include name="IDR_SNIPPETS_INTERNALS_JS" file="resources\snippets_internals.js" compress="gzip" type="BINDATA" />
<part file="vr_shell_resources.grdp" />
</if>
<include name="IDR_SUPERVISED_USER_INTERNALS_HTML" file="resources\supervised_user_internals.html" allowexternalscript="true" compress="gzip" type="BINDATA" />
<include name="IDR_SUPERVISED_USER_INTERNALS_CSS" file="resources\supervised_user_internals.css" compress="gzip" type="BINDATA" />
......
......@@ -158,3 +158,15 @@ if (enable_extensions) {
output_dir = "$root_gen_dir/chrome"
}
}
if (enable_vr) {
grit("vr_shell_resources") {
source = "vr_shell_resources.grd"
defines = chrome_grit_defines
outputs = [
"grit/vr_shell_resources.h",
"vr_shell_resources.pak",
]
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/vr_shell_resources.h" type="rc_header">
<emit emit_type='prepend'></emit>
</output>
<output filename="vr_shell_resources.pak" type="data_package" />
</outputs>
<release seq="1">
<includes>
<!-- TODO(vollick): add conditionals for test-specific generic assets (see crbug.com/743687) -->
<include name="IDR_VR_SHELL_DDCONTROLLER_MODEL" file="vr_shell\ddcontroller.glb" type="BINDATA" />
<include name="IDR_VR_SHELL_DDCONTROLLER_IDLE_TEXTURE" file="vr_shell\tex\ddcontroller_idle.png" type="BINDATA" />
<include name="IDR_VR_SHELL_DDCONTROLLER_APP_PATCH" file="vr_shell\tex\ddcontroller_app.png" type="BINDATA" />
<include name="IDR_VR_SHELL_DDCONTROLLER_TOUCHPAD_PATCH" file="vr_shell\tex\ddcontroller_touchpad.png" type="BINDATA" />
<include name="IDR_VR_SHELL_DDCONTROLLER_SYSTEM_PATCH" file="vr_shell\tex\ddcontroller_system.png" type="BINDATA" />
</includes>
</release>
</grit>
......@@ -109,6 +109,7 @@ static_library("vr_common") {
"//cc/animation",
"//cc/paint",
"//chrome/app:generated_resources",
"//chrome/browser/resources:vr_shell_resources",
"//components/security_state/core",
"//components/strings",
"//components/toolbar",
......
......@@ -7,7 +7,7 @@
#include "base/memory/ptr_util.h"
#include "base/trace_event/trace_event.h"
#include "chrome/browser/vr/gltf_parser.h"
#include "chrome/grit/browser_resources.h"
#include "chrome/grit/vr_shell_resources.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkRect.h"
#include "third_party/skia/include/core/SkSurface.h"
......
<?xml version="1.0" encoding="UTF-8"?>
<grit-part>
<if expr="enable_vr">
<include name="IDR_VR_SHELL_DDCONTROLLER_MODEL" file="resources\vr_shell\ddcontroller.glb" type="BINDATA" />
<include name="IDR_VR_SHELL_DDCONTROLLER_IDLE_TEXTURE" file="resources\vr_shell\tex\ddcontroller_idle.png" type="BINDATA" />
<include name="IDR_VR_SHELL_DDCONTROLLER_APP_PATCH" file="resources\vr_shell\tex\ddcontroller_app.png" type="BINDATA" />
<include name="IDR_VR_SHELL_DDCONTROLLER_TOUCHPAD_PATCH" file="resources\vr_shell\tex\ddcontroller_touchpad.png" type="BINDATA" />
<include name="IDR_VR_SHELL_DDCONTROLLER_SYSTEM_PATCH" file="resources\vr_shell\tex\ddcontroller_system.png" type="BINDATA" />
</if>
</grit-part>
......@@ -171,6 +171,10 @@ template("chrome_extra_paks") {
"//extensions:extensions_resources",
]
}
if (enable_vr) {
sources += [ "$root_gen_dir/chrome/vr_shell_resources.pak" ]
deps += [ "//chrome/browser/resources:vr_shell_resources" ]
}
}
}
......
......@@ -121,9 +121,12 @@
"chrome/browser/resources/translate_internals_resources.grd": {
"includes": [12620],
},
"chrome/browser/resources/webapks_ui_resources.grd": {
"chrome/browser/resources/vr_shell_resources.grd": {
"includes": [12630],
},
"chrome/browser/resources/webapks_ui_resources.grd": {
"includes": [12640],
},
# END chrome/browser section.
# START chrome/ miscellaneous section.
......
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