diff options
author | n.bansal <n.bansal@samsung.com> | 2014-09-19 12:16:09 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-19 19:16:55 +0000 |
commit | cb0114633bb478c4636126d9d2ed87c1580e9ff8 (patch) | |
tree | d8e6b08689dd6b456abc0c2c7dca26c09c537c68 /pdf/out_of_process_instance.cc | |
parent | 62bb80ad12b37f318b69b77c137a943b673cc59f (diff) | |
download | chromium_src-cb0114633bb478c4636126d9d2ed87c1580e9ff8.zip chromium_src-cb0114633bb478c4636126d9d2ed87c1580e9ff8.tar.gz chromium_src-cb0114633bb478c4636126d9d2ed87c1580e9ff8.tar.bz2 |
PDF Viewer - Add keyboard shortcuts for rotation
Currently there are no keyboard shortcuts to rotate pdf
documents. This patch adds the following keyboard shortcuts
to rotate pdf documents :
Rotate counterclockwise : Control + [
Rotate clockwise : Control + ]
BUG=111232
Review URL: https://codereview.chromium.org/581913003
Cr-Commit-Position: refs/heads/master@{#295757}
Diffstat (limited to 'pdf/out_of_process_instance.cc')
-rw-r--r-- | pdf/out_of_process_instance.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc index f3916f8..a385bb3 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() && |