Chromium Code Reviews| Index: pdf/out_of_process_instance.cc |
| diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc |
| index a385bb3aa93e8fcb8e1ff851786043c6d4bea994..993d804381d99610e374ff9f4680d189f1e6be7c 100644 |
| --- a/pdf/out_of_process_instance.cc |
| +++ b/pdf/out_of_process_instance.cc |
| @@ -127,6 +127,7 @@ const char kJSEmailBody[] = "body"; |
| // Rotation (Page -> Plugin) |
| const char kJSRotateClockwiseType[] = "rotateClockwise"; |
| const char kJSRotateCounterclockwiseType[] = "rotateCounterclockwise"; |
| +const char kJSSelectAllType[] = "selectAll"; |
|
Nikhil
2014/10/02 12:27:01
How about adding a comment here? Looks to be a pra
Deepak
2014/10/02 12:40:32
Done.
|
| const int kFindResultCooldownMs = 100; |
| @@ -381,6 +382,8 @@ void OutOfProcessInstance::HandleMessage(const pp::Var& message) { |
| RotateClockwise(); |
| } else if (type == kJSRotateCounterclockwiseType) { |
| RotateCounterclockwise(); |
| + } else if (type == kJSSelectAllType) { |
| + engine_->SelectAll(); |
| } else if (type == kJSResetPrintPreviewModeType && |
| dict.Get(pp::Var(kJSPrintPreviewUrl)).is_string() && |
| dict.Get(pp::Var(kJSPrintPreviewGrayscale)).is_bool() && |
| @@ -488,16 +491,6 @@ bool OutOfProcessInstance::HandleInputEvent( |
| // TODO(raymes): Implement this scroll behavior in JS: |
|
Nikhil
2014/10/02 12:27:00
Is this TODO still valid?
Deepak
2014/10/02 12:40:32
I think this is handles in the js by arrow keys an
|
| // When click+dragging, scroll the document correctly. |
| - if (event.GetType() == PP_INPUTEVENT_TYPE_KEYDOWN && |
| - event.GetModifiers() & kDefaultKeyModifier) { |
| - pp::KeyboardInputEvent keyboard_event(event); |
| - switch (keyboard_event.GetKeyCode()) { |
| - case 'A': |
| - engine_->SelectAll(); |
| - return true; |
| - } |
| - } |
| - |
| // Return true for unhandled clicks so the plugin takes focus. |
| return (event.GetType() == PP_INPUTEVENT_TYPE_MOUSEDOWN); |
| } |