Commit 99d553b3 authored by dstockwell's avatar dstockwell Committed by Commit Bot

pdf: Switch to the threaded version of ink

Updates the resource manager to not require a mime type when loading
a bundled resource. This is the same as the behavior in [1].

[1] https://cs.chromium.org/chromium/src/extensions/browser/extension_protocols.cc?q=extension_protocols.cc&sq=package:chromium&dr&l=340

Bug: 902646
Change-Id: Ib65eafd6fc900351a9270317a711c9d3ab092f80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1501194
Commit-Queue: dstockwell <dstockwell@chromium.org>
Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638324}
parent 6189619b
...@@ -42,6 +42,8 @@ ChromeComponentExtensionResourceManager() { ...@@ -42,6 +42,8 @@ ChromeComponentExtensionResourceManager() {
{"chrome_app/chrome_app_icon_32.png", IDR_CHROME_APP_ICON_32}, {"chrome_app/chrome_app_icon_32.png", IDR_CHROME_APP_ICON_32},
{"chrome_app/chrome_app_icon_192.png", IDR_CHROME_APP_ICON_192}, {"chrome_app/chrome_app_icon_192.png", IDR_CHROME_APP_ICON_192},
{"pdf/ink/ink_lib_binary.js", IDR_INK_LIB_BINARY_JS}, {"pdf/ink/ink_lib_binary.js", IDR_INK_LIB_BINARY_JS},
{"pdf/ink/pthread-main.js", IDR_INK_PTHREAD_MAIN_JS},
{"pdf/ink/glcore_base.js.mem", IDR_INK_GLCORE_BASE_JS_MEM, true},
{"pdf/ink/glcore_base.wasm", IDR_INK_GLCORE_BASE_WASM, true}, {"pdf/ink/glcore_base.wasm", IDR_INK_GLCORE_BASE_WASM, true},
{"pdf/ink/glcore_wasm_bootstrap_compiled.js", {"pdf/ink/glcore_wasm_bootstrap_compiled.js",
IDR_INK_GLCORE_WASM_BOOTSTRAP_COMPILED_JS}, IDR_INK_GLCORE_WASM_BOOTSTRAP_COMPILED_JS},
......
...@@ -239,10 +239,6 @@ class ResourceBundleFileLoader : public network::mojom::URLLoader { ...@@ -239,10 +239,6 @@ class ResourceBundleFileLoader : public network::mojom::URLLoader {
void OnMimeTypeRead(scoped_refptr<base::RefCountedMemory> data, void OnMimeTypeRead(scoped_refptr<base::RefCountedMemory> data,
std::string* read_mime_type, std::string* read_mime_type,
bool read_result) { bool read_result) {
if (!read_result) {
client_->OnComplete(network::URLLoaderCompletionStatus(net::ERR_FAILED));
return;
}
network::ResourceResponseHead head; network::ResourceResponseHead head;
head.request_start = base::TimeTicks::Now(); head.request_start = base::TimeTicks::Now();
head.response_start = base::TimeTicks::Now(); head.response_start = base::TimeTicks::Now();
......
...@@ -12,8 +12,10 @@ ...@@ -12,8 +12,10 @@
<includes> <includes>
<if expr="chromeos"> <if expr="chromeos">
<include name="IDR_INK_LIB_BINARY_JS" file="build/ink_lib_binary.js" type="BINDATA" /> <include name="IDR_INK_LIB_BINARY_JS" file="build/ink_lib_binary.js" type="BINDATA" />
<include name="IDR_INK_GLCORE_BASE_WASM" file="build/wasm/glcore_base.wasm" compress="gzip" type="BINDATA" /> <include name="IDR_INK_PTHREAD_MAIN_JS" file="build/wasm-threads/pthread-main.js" type="BINDATA" />
<include name="IDR_INK_GLCORE_WASM_BOOTSTRAP_COMPILED_JS" file="build/wasm/glcore_wasm_bootstrap_compiled.js" type="BINDATA" /> <include name="IDR_INK_GLCORE_BASE_WASM" file="build/wasm-threads/glcore_base.wasm" compress="gzip" type="BINDATA" />
<include name="IDR_INK_GLCORE_BASE_JS_MEM" file="build/wasm-threads/glcore_base.js.mem" compress="gzip" type="BINDATA" />
<include name="IDR_INK_GLCORE_WASM_BOOTSTRAP_COMPILED_JS" file="build/wasm-threads/glcore_wasm_bootstrap_compiled.js" type="BINDATA" />
</if> </if>
</includes> </includes>
</release> </release>
......
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