| Index: chrome/browser/resources/pdf/pdf.js
|
| diff --git a/chrome/browser/resources/pdf/pdf.js b/chrome/browser/resources/pdf/pdf.js
|
| index 14aebcf8cdd755cb52ca1a871027d8acf8bc1c35..8db8ba16f94a559e8e11c943398ea1669d866b68 100644
|
| --- a/chrome/browser/resources/pdf/pdf.js
|
| +++ b/chrome/browser/resources/pdf/pdf.js
|
| @@ -131,13 +131,16 @@ function PDFViewer(browserApi) {
|
| var shortWindow = window.innerHeight < PDFViewer.TOOLBAR_WINDOW_MIN_HEIGHT;
|
| var topToolbarHeight =
|
| (toolbarEnabled) ? PDFViewer.MATERIAL_TOOLBAR_HEIGHT : 0;
|
| + var defaultZoom =
|
| + this.browserApi_.getZoomBehavior() == BrowserApi.ZoomBehavior.MANAGE ?
|
| + this.browserApi_.getDefaultZoom() : 1.0;
|
| this.viewport_ = new Viewport(window,
|
| this.sizer_,
|
| this.viewportChanged_.bind(this),
|
| this.beforeZoom_.bind(this),
|
| this.afterZoom_.bind(this),
|
| getScrollbarWidth(),
|
| - this.browserApi_.getDefaultZoom(),
|
| + defaultZoom,
|
| topToolbarHeight);
|
|
|
| // Create the plugin object dynamically so we can set its src. The plugin
|
| @@ -230,9 +233,11 @@ function PDFViewer(browserApi) {
|
| new ToolbarManager(window, this.toolbar_, this.zoomToolbar_);
|
|
|
| // Set up the ZoomManager.
|
| - this.zoomManager_ = new ZoomManager(
|
| - this.viewport_, this.browserApi_.setZoom.bind(this.browserApi_),
|
| + this.zoomManager_ = ZoomManager.create(
|
| + this.browserApi_.getZoomBehavior(), this.viewport_,
|
| + this.browserApi_.setZoom.bind(this.browserApi_),
|
| this.browserApi_.getInitialZoom());
|
| + this.viewport_.zoomManager = this.zoomManager_;
|
| this.browserApi_.addZoomEventListener(
|
| this.zoomManager_.onBrowserZoomChange.bind(this.zoomManager_));
|
|
|
|
|