
Implement the annotation brush type selection in the frontend of the PDF viewer. It will send a setAnnotationBrush message to the backend to tell it what type, color, and size of brush to set the annotation brush to. This uses the existing annotation bar UI from CrOS's annotation mode. Some types of brushes shouldn't need a color or size, such as the eraser. This is reflected in AnnotationBrushParams, where either all values must be set or the params should be missing completely. There is a slight difference in behavior from the new annotation mode and the existing CrOS annotation mode: normally, the annotation tool would be updated every time the annotation menu was clicked, even if the values didn't change. The new annotation mode shouldn't do this, otherwise it will send many messages to the backend. Bug: 335521186 Change-Id: Ib909927d2d8e6a132c867eafc3d3feadd2cd7c6a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5540210 Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org> Commit-Queue: Andy Phan <andyphan@chromium.org> Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com> Reviewed-by: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/main@{#1301653}
//pdf
contains the PDF plugin, its Blink-based replacement, as well as PDF
utility functions that leverage PDFium. It can use low-level components that
live below the content layer, as well as other foundational code like
//printing
. It should not use //content
or anything in //components
that
lives above the content layer. Code that lives above the content layer should
live in //components/pdf
, or in the embedder. All the code here should run in
sandboxed child processes.
TODO(crbug.com/40186598): Remove existing //content
dependencies.