Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8362)

Unified Diff: chrome/browser/resources/pdf/pdf.js

Issue 615853003: Handle the keyboard event for ctrl+a inside pdf.js instead of out_of_process_pdf.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pdf/out_of_process_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/pdf/pdf.js
diff --git a/chrome/browser/resources/pdf/pdf.js b/chrome/browser/resources/pdf/pdf.js
index 0616c8df40ab1d66ea0ae1a68b962736a9fa4c32..2b22e600f5872bf26e2d67c2844d597218b79244 100644
--- a/chrome/browser/resources/pdf/pdf.js
+++ b/chrome/browser/resources/pdf/pdf.js
@@ -218,6 +218,13 @@ PDFViewer.prototype = {
this.viewport.position = position;
}
return;
+ case 65: // a key.
+ if (e.ctrlKey || e.metaKey) {
+ this.plugin_.postMessage({
+ type: 'selectAll',
+ });
+ }
+ return;
case 83: // s key.
if (e.ctrlKey || e.metaKey) {
// Simulate a click on the button so that the <a download ...>
« no previous file with comments | « no previous file | pdf/out_of_process_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698