The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src.git/+/6b4d81b2d610bba6e691389b2ef771db17c40498
commit 6b4d81b2d610bba6e691389b2ef771db17c40498
Author: dstockwell <dstockwell@google.com>
Date: Mon Dec 10 01:43:41 2018
pdf: Introduce content controller abstraction
Primary motivation is to enable the plugin to be swapped out for the
Ink-based PDF renderer in annotation mode.
* An abstract `ContentController` class is added. This abstracts the
logic that pdf_viewer used to communicate with the plugin so that
the Ink component can replace it. Most plugin logic has been moved
to `PluginController`, this also required adding many new APIs to
`PDFViewer` to allow messages from the plugin to behave as before
without exposing too much of `PDFViewer` private details. There are
still some uses of `plugin.postMessage` that can be converted to
`ContentController` APIs in future.
* The PDF saving logic has been slightly rewritten using promises.
Instead of storing only tokens, at save-request time a promise
is created and associated with the token. When the save data
becomes available (or is consumed) the promise is resolved.
Bug: 902646
Change-Id: Ic33b7c250eb54515564a3646283e3897419984af
Reviewed-on: https://chromium-review.googlesource.com/c/1368845
Commit-Queue: dstockwell <dstockwell@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615028}
[modify] https://crrev.com/6b4d81b2d610bba6e691389b2ef771db17c40498/chrome/browser/resources/pdf/pdf_viewer.js
@dstockwell: Passing on a request I received privately for consideration.
"The best PDF annotation apps (Xodo is a good example) have a stylus only option. This option makes it so that only the stylus draws, and your fingers are used for navigation and selecting annotations. This really is a must have feature for PDF annotation as it does not require the user to enter/exit edit mode."
The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src.git/+/b40eb5f558d94b70ea763e00664e5ea6b706ab74
commit b40eb5f558d94b70ea763e00664e5ea6b706ab74
Author: dstockwell <dstockwell@google.com>
Date: Thu Dec 13 19:56:53 2018
Reland "pdf: Introduce content controller abstraction"
This is a reland of 6b4d81b2d610bba6e691389b2ef771db17c40498
Original change's description:
> pdf: Introduce content controller abstraction
>
> Primary motivation is to enable the plugin to be swapped out for the
> Ink-based PDF renderer in annotation mode.
>
> * An abstract `ContentController` class is added. This abstracts the
> logic that pdf_viewer used to communicate with the plugin so that
> the Ink component can replace it. Most plugin logic has been moved
> to `PluginController`, this also required adding many new APIs to
> `PDFViewer` to allow messages from the plugin to behave as before
> without exposing too much of `PDFViewer` private details. There are
> still some uses of `plugin.postMessage` that can be converted to
> `ContentController` APIs in future.
> * The PDF saving logic has been slightly rewritten using promises.
> Instead of storing only tokens, at save-request time a promise
> is created and associated with the token. When the save data
> becomes available (or is consumed) the promise is resolved.
>
> Bug: 902646
> Change-Id: Ic33b7c250eb54515564a3646283e3897419984af
> Reviewed-on: https://chromium-review.googlesource.com/c/1368845
> Commit-Queue: dstockwell <dstockwell@chromium.org>
> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
> Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#615028}
Bug: 902646,914596
Change-Id: I73e6dcc1b077ef824232ddb2817dee1dd4bc6429
Reviewed-on: https://chromium-review.googlesource.com/c/1375295
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dstockwell <dstockwell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616406}
[modify] https://crrev.com/b40eb5f558d94b70ea763e00664e5ea6b706ab74/chrome/browser/resources/pdf/pdf_viewer.js
Chrome on ChromeOS stopped building for me yesterday with the error below. Is there some additional action I'm missing?
FAILED: gen/third_party/ink/ink_resources_stamp.d.stamp gen/third_party/ink/grit/ink_resources.h gen/third_party/ink/grit/ink_resources_map.cc gen/third_party/ink/grit/ink_resources_map.h gen/third_party/ink/ink_resources.pak gen/third_party/ink/ink_resources.pak.info
python ../../tools/grit/grit.py -i ../../third_party/ink/ink_resources.grd build -o gen/third_party/ink --depdir . --depfile gen/third_party/ink/ink_resources_stamp.d --write-only-new=1 --depend-on-stamp -D _chromium -E CHROMIUM_BUILD=chromium -D chromeos -D scale_factors=2x -D toolkit_views -D use_aura -D use_nss_certs -D use_ozone -t linux2 -f ../../tools/gritsettings/resource_ids --assert-file-list=obj/third_party/ink/ink_resources_expected_outputs.txt
Error processing node <?xml version="1.0" encoding="UTF-8"?>
<include file="build/ink_lib_binary.js" name="IDR_INK_LIB_BINARY_JS" type="BINDATA" />
Traceback (most recent call last):
File "../../tools/grit/grit.py", line 15, in <module>
sys.exit(grit.grit_runner.Main(sys.argv[1:]))
File "/usr/local/google/home/vkuzkokov/cr/src/tools/grit/grit/grit_runner.py", line 256, in Main
return toolobject.Run(options, args[1:])
File "/usr/local/google/home/vkuzkokov/cr/src/tools/grit/grit/tool/build.py", line 260, in Run
self.Process()
File "/usr/local/google/home/vkuzkokov/cr/src/tools/grit/grit/tool/build.py", line 401, in Process
self.ProcessNode(self.res, output, outfile)
File "/usr/local/google/home/vkuzkokov/cr/src/tools/grit/grit/tool/build.py", line 324, in ProcessNode
formatted = formatter(node, output_node.GetLanguage(), output_dir=base_dir)
File "/usr/local/google/home/vkuzkokov/cr/src/tools/grit/grit/format/data_pack.py", line 83, in Format
value = node.GetDataPackValue(lang, UTF8)
File "/usr/local/google/home/vkuzkokov/cr/src/tools/grit/grit/node/include.py", line 102, in GetDataPackValue
data = util.ReadFile(filename, util.BINARY)
File "/usr/local/google/home/vkuzkokov/cr/src/tools/grit/grit/util.py", line 206, in ReadFile
with open(filename, mode) as f:
IOError: [Errno 2] No such file or directory: u'../../third_party/ink/build/ink_lib_binary.js'
I'm getting the same BUILD failure as Comment #34. My gn args does include target_os = "chromeos", here's the full args:
use_goma = true
target_os = "chromeos"
is_debug = false
is_component_build = true
dcheck_always_on = true
closure_compile = true
use_jumbo_build = false
I had a compile issue with the ink library last week (same issue as vkuzkokov and katie) and someone else is reporting this is breaking them this morning:
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/8zjIwSJ-ZoQ
Could a BUILD rule be misconfigured that leads to ink changes breaking chromeos builds?
Comment 1 by bugdroid1@chromium.org
, Nov 28