Index: chrome/browser/resources/pdf/pdf.js |
diff --git a/chrome/browser/resources/pdf/pdf.js b/chrome/browser/resources/pdf/pdf.js |
index eaf96ac6559e17fa4f494b4e89bda07c2d7ff9cf..eaa6b566eb3251a5b98d7890b6d0b6a7ffa4e5ab 100644 |
--- a/chrome/browser/resources/pdf/pdf.js |
+++ b/chrome/browser/resources/pdf/pdf.js |
@@ -190,6 +190,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 = { |
@@ -344,21 +346,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 |
@@ -518,6 +512,9 @@ PDFViewer.prototype = { |
if (this.isMaterial_) |
this.bookmarksPane_.bookmarks = message.data.bookmarks; |
break; |
+ case 'setIsSelecting': |
+ this.viewportScroller_.setEnableScrolling(message.data.isSelecting); |
+ break; |
} |
}, |