Index: chrome/browser/resources/pdf/pdf.js |
diff --git a/chrome/browser/resources/pdf/pdf.js b/chrome/browser/resources/pdf/pdf.js |
index c6df1a1a1ed6e676cc6d9bf46dac5a6a4859493a..e68654cccd751b327f0cd5a5f8e906507c855f45 100644 |
--- a/chrome/browser/resources/pdf/pdf.js |
+++ b/chrome/browser/resources/pdf/pdf.js |
@@ -191,6 +191,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 = { |
@@ -345,21 +347,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 |
@@ -517,6 +511,9 @@ PDFViewer.prototype = { |
if (this.isMaterial_) |
this.bookmarksPane.bookmarks = message.data.bookmarks; |
break; |
+ case 'setIsSelecting': |
+ this.viewportScroller_.viewportScroll(message.data.isSelecting); |
+ break; |
} |
}, |