OOP PDF: Forward keyboard events to a constrained web dialog's initiator's delegate.
WebDialogWebContentsDelegateViews forwards keyboard events that it receives to the Browser for its initiating WebContents. The out-of-process PDF plugin is implemented as a nested WebContents containing the extension implementation within the WebContents of the tab. When a print-preview dialog is launched for a PDF from the out-of-process plugin, the dialog's initiator is the nested WebContents, which does not have an associated Browser. This causes keyboard events to be dropped, breaking keyboard shortcuts. This CL fixes this by changing WebDialogWebContentsDelegateViews to forward keyboard events to its initiator's delegate. BUG=423453 TEST=Run with --out-of-process-pdf. Open a PDF and use the print toolbar button to launch the print preview dialog. From this dialog, keyboard shortcuts should work, e.g. escape should cancel the dialog. Review URL: https://codereview.chromium.org/738323002 Cr-Commit-Position: refs/heads/master@{#305125}
Showing
Please register or sign in to comment