
To do this, plumb a HasEditableText() call through PPAPI to the PDF plugin, where it uses the FORM_GetFocusedText() PDFium API to check if there is text to select. Enable the context menu item only if there is text to select. Then hook up the "Select all" command to send a synthesized ctrl + a keyboard event to the plugin. BUG=753216 Change-Id: Ideaf19ff5e848a428e15f191e66587a0c8fe05b0 Reviewed-on: https://chromium-review.googlesource.com/640560 Reviewed-by: Bill Budge <bbudge@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#551652}