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

Unified Diff: chrome/browser/resources/pdf/pdf.js

Issue 814573004: Fix for Multipage selection by dragging mouse in OOP case in PDF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nit. Created 5 years, 10 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 | « chrome/browser/resources/pdf/index-material.html ('k') | chrome/browser/resources/pdf/viewport_scroller.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/pdf/pdf.js
diff --git a/chrome/browser/resources/pdf/pdf.js b/chrome/browser/resources/pdf/pdf.js
index bf23ee18594af5cc7926b21fc90f4f97e60af0d1..828ea7e44784b34357bbe331a24873bd37ceb575 100644
--- a/chrome/browser/resources/pdf/pdf.js
+++ b/chrome/browser/resources/pdf/pdf.js
@@ -194,6 +194,8 @@ function PDFViewer(streamDetails) {
this.navigator_ = new Navigator(this.streamDetails_.originalUrl,
this.viewport_, this.paramsParser_, onNavigateInCurrentTab,
onNavigateInNewTab);
+ this.viewportScroller_ =
+ new ViewportScroller(this.viewport_, this.plugin_, window);
}
PDFViewer.prototype = {
@@ -348,21 +350,13 @@ PDFViewer.prototype = {
* @private
* Notify the plugin to print.
*/
- print_: function() {
- this.plugin_.postMessage({
- type: 'print'
- });
- },
+ print_: function() { this.plugin_.postMessage({type: 'print'}); },
/**
* @private
* Notify the plugin to save.
*/
- save_: function() {
- this.plugin_.postMessage({
- type: 'save'
- });
- },
+ save_: function() { this.plugin_.postMessage({type: 'save'}); },
/**
* @private
@@ -524,6 +518,9 @@ PDFViewer.prototype = {
this.materialToolbar_.hasBookmarks = true;
}
break;
+ case 'setIsSelecting':
+ this.viewportScroller_.setEnableScrolling(message.data.isSelecting);
+ break;
}
},
« no previous file with comments | « chrome/browser/resources/pdf/index-material.html ('k') | chrome/browser/resources/pdf/viewport_scroller.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698