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..250b97e511e0728f0b4df0f8891be179756c9851 100644 |
| --- a/pdf/out_of_process_instance.cc |
| +++ b/pdf/out_of_process_instance.cc |
| @@ -127,6 +127,8 @@ const char kJSEmailBody[] = "body"; |
| // Rotation (Page -> Plugin) |
| const char kJSRotateClockwiseType[] = "rotateClockwise"; |
| const char kJSRotateCounterclockwiseType[] = "rotateCounterclockwise"; |
| +// SelectAll content (Page -> Plugin) |
|
raymes
2014/10/02 14:18:56
nit: // Select all text in the document (Page -> P
Deepak
2014/10/02 14:57:34
Done.
|
| +const char kJSSelectAllType[] = "selectAll"; |
| const int kFindResultCooldownMs = 100; |
| @@ -381,6 +383,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 +492,6 @@ bool OutOfProcessInstance::HandleInputEvent( |
| // TODO(raymes): Implement this scroll behavior in JS: |
| // 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); |
| } |