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

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

Issue 2503633002: Propagate browser zoom changes to embedded PDFs. (Closed)
Patch Set: Apply internal pdf zoom to browser zoom. Created 4 years, 1 month 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
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..357b9c4c19a35f5a86e31b8fae478bfbf3eda8f2 100644
--- a/chrome/browser/resources/pdf/pdf.js
+++ b/chrome/browser/resources/pdf/pdf.js
@@ -137,7 +137,7 @@ function PDFViewer(browserApi) {
this.beforeZoom_.bind(this),
this.afterZoom_.bind(this),
getScrollbarWidth(),
- this.browserApi_.getDefaultZoom(),
+ this.browserApi_.getInitialZoom(),
raymes 2016/11/17 00:59:57 Hmm, how come you're changing this to InitialZoom
Sam McNally 2016/11/18 04:59:23 The reason for the default zoom was for PDFs we wa
Kevin McNee 2016/11/22 23:17:32 Right. If the tab the pdf is in has been zoomed, w
Sam McNally 2016/11/28 07:25:13 For non-embedded PDFs we still want to use the def
Kevin McNee 2016/11/28 16:18:44 Yes, if it's not embedded, we set the zoom mode to
Kevin McNee 2016/11/28 17:03:32 Done.
topToolbarHeight);
// Create the plugin object dynamically so we can set its src. The plugin
@@ -230,7 +230,7 @@ function PDFViewer(browserApi) {
new ToolbarManager(window, this.toolbar_, this.zoomToolbar_);
// Set up the ZoomManager.
- this.zoomManager_ = new ZoomManager(
+ this.zoomManager_ = ZoomManager.create(this.browserApi_.getZoomBehaviour(),
this.viewport_, this.browserApi_.setZoom.bind(this.browserApi_),
this.browserApi_.getInitialZoom());
this.browserApi_.addZoomEventListener(

Powered by Google App Engine
This is Rietveld 408576698