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

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

Issue 477933003: OOP PDF - Add OpenPDFParamsParser class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove invalid comment and change method name Created 6 years, 4 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
Index: chrome/browser/resources/pdf/viewport.js
diff --git a/chrome/browser/resources/pdf/viewport.js b/chrome/browser/resources/pdf/viewport.js
index 7a225da2043546ef105544d78f385bb0c865ea54..39dd81b2756c4552e4c7eedfd4c973ed0bb8118c 100644
--- a/chrome/browser/resources/pdf/viewport.js
+++ b/chrome/browser/resources/pdf/viewport.js
@@ -45,6 +45,7 @@ function Viewport(window,
this.pageDimensions_ = [];
this.scrollbarWidth_ = scrollbarWidth;
this.fittingType_ = Viewport.FittingType.NONE;
+ this.initialViewport_ = {};
window.addEventListener('scroll', this.updateViewport_.bind(this));
window.addEventListener('resize', this.resize_.bind(this));
@@ -176,6 +177,14 @@ Viewport.prototype = {
},
/**
+ * Initial viewport settings to be used to open pdf. These are
+ * set by parsing open pdf parameters.
+ */
+ set initialViewportSettings(viewportSettings) {
+ this.initialViewport_ = viewportSettings;
+ },
raymes 2014/08/27 01:02:24 I think we don't need this setter, we can just cal
Nikhil 2014/08/27 10:16:09 Done.
+
+ /**
* @type {Object} the size of the viewport excluding scrollbars.
*/
get size() {

Powered by Google App Engine
This is Rietveld 408576698