diff options
author | deepak.m1 <deepak.m1@samsung.com> | 2015-02-13 03:56:23 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-13 11:56:55 +0000 |
commit | 423f09c6d2be8c916637cdda28ed0ee4e12490e0 (patch) | |
tree | 3e7792c64daff60ebe8100962e73755c0ba17963 /pdf/out_of_process_instance.cc | |
parent | aa934d4d264715ab4c52b1cbefcd9447e3230987 (diff) | |
download | chromium_src-423f09c6d2be8c916637cdda28ed0ee4e12490e0.zip chromium_src-423f09c6d2be8c916637cdda28ed0ee4e12490e0.tar.gz chromium_src-423f09c6d2be8c916637cdda28ed0ee4e12490e0.tar.bz2 |
Fix for Multipage selection by dragging mouse in OOP case in PDF.
Code was not present for handling drag by mouse.
Now we are passing message when their is selection happening and based on mousemove event handler we are scrolling page when mouse points are outside the viewport.
When we move mouse outside the viewport and does not move then mousemove events will not come then we are scrolling based on timer.
BUG=446831
Review URL: https://codereview.chromium.org/814573004
Cr-Commit-Position: refs/heads/master@{#316204}
Diffstat (limited to 'pdf/out_of_process_instance.cc')
-rw-r--r-- | pdf/out_of_process_instance.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc index 169a440..74544d9 100644 --- a/pdf/out_of_process_instance.cc +++ b/pdf/out_of_process_instance.cc @@ -144,6 +144,10 @@ const char kJSSelectedText[] = "selectedText"; const char kJSSetNamedDestinationsType[] = "setNamedDestinations"; const char kJSNamedDestinations[] = "namedDestinations"; +// Selecting text in document (Plugin -> Page) +const char kJSSetIsSelectingType[] = "setIsSelecting"; +const char kJSIsSelecting[] = "isSelecting"; + const int kFindResultCooldownMs = 100; const double kMinZoom = 0.01; @@ -1351,6 +1355,13 @@ uint32 OutOfProcessInstance::GetBackgroundColor() { return background_color_; } +void OutOfProcessInstance::IsSelectingChanged(bool is_selecting) { + pp::VarDictionary message; + message.Set(kType, kJSSetIsSelectingType); + message.Set(kJSIsSelecting, pp::Var(is_selecting)); + PostMessage(message); +} + void OutOfProcessInstance::ProcessPreviewPageInfo(const std::string& url, int dst_page_index) { if (!IsPrintPreview()) |