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

Unified Diff: pdf/out_of_process_instance.cc

Issue 581913003: PDF Viewer - Add keyboard shortcuts for rotation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback (nit fix) Created 6 years, 3 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 | « pdf/instance.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/out_of_process_instance.cc
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
index f3916f8922e399dec6248a3da47dfdaa6c76afe8..a385bb3aa93e8fcb8e1ff851786043c6d4bea994 100644
--- a/pdf/out_of_process_instance.cc
+++ b/pdf/out_of_process_instance.cc
@@ -124,6 +124,9 @@ const char kJSEmailCc[] = "cc";
const char kJSEmailBcc[] = "bcc";
const char kJSEmailSubject[] = "subject";
const char kJSEmailBody[] = "body";
+// Rotation (Page -> Plugin)
+const char kJSRotateClockwiseType[] = "rotateClockwise";
+const char kJSRotateCounterclockwiseType[] = "rotateCounterclockwise";
const int kFindResultCooldownMs = 100;
@@ -374,6 +377,10 @@ void OutOfProcessInstance::HandleMessage(const pp::Var& message) {
}
} else if (type == kJSPrintType) {
Print();
+ } else if (type == kJSRotateClockwiseType) {
+ RotateClockwise();
+ } else if (type == kJSRotateCounterclockwiseType) {
+ RotateCounterclockwise();
} else if (type == kJSResetPrintPreviewModeType &&
dict.Get(pp::Var(kJSPrintPreviewUrl)).is_string() &&
dict.Get(pp::Var(kJSPrintPreviewGrayscale)).is_bool() &&
« no previous file with comments | « pdf/instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698