OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** | 7 /** |
8 * @return {number} Width of a scrollbar in pixels | 8 * @return {number} Width of a scrollbar in pixels |
9 */ | 9 */ |
10 function getScrollbarWidth() { | 10 function getScrollbarWidth() { |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // the zoom. onZoomChange() is called before setZoomComplete() callback | 145 // the zoom. onZoomChange() is called before setZoomComplete() callback |
146 // when we initiate the zoom. | 146 // when we initiate the zoom. |
147 if ((zoomDelta > MIN_ZOOM_DELTA) && !this.setZoomInProgress_) | 147 if ((zoomDelta > MIN_ZOOM_DELTA) && !this.setZoomInProgress_) |
148 this.viewport_.setZoom(zoomChangeInfo.newZoomFactor); | 148 this.viewport_.setZoom(zoomChangeInfo.newZoomFactor); |
149 }.bind(this)); | 149 }.bind(this)); |
150 } | 150 } |
151 | 151 |
152 // Parse open pdf parameters. | 152 // Parse open pdf parameters. |
153 this.paramsParser_ = new OpenPDFParamsParser(); | 153 this.paramsParser_ = new OpenPDFParamsParser(); |
154 this.navigator_ = new Navigator(this.streamDetails_.originalUrl, | 154 this.navigator_ = new Navigator(this.streamDetails_.originalUrl, |
155 this.viewport_, this.paramsParser_); | 155 this.viewport_, this.paramsParser_, function() {}, function() {}); |
156 } | 156 } |
157 | 157 |
158 PDFViewer.prototype = { | 158 PDFViewer.prototype = { |
159 /** | 159 /** |
160 * @private | 160 * @private |
161 * Handle key events. These may come from the user directly or via the | 161 * Handle key events. These may come from the user directly or via the |
162 * scripting API. | 162 * scripting API. |
163 * @param {KeyboardEvent} e the event to handle. | 163 * @param {KeyboardEvent} e the event to handle. |
164 */ | 164 */ |
165 handleKeyEvent_: function(e) { | 165 handleKeyEvent_: function(e) { |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 * Each bookmark is an Object containing a: | 680 * Each bookmark is an Object containing a: |
681 * - title | 681 * - title |
682 * - page (optional) | 682 * - page (optional) |
683 * - array of children (themselves bookmarks) | 683 * - array of children (themselves bookmarks) |
684 * @type {Array} the top-level bookmarks of the PDF. | 684 * @type {Array} the top-level bookmarks of the PDF. |
685 */ | 685 */ |
686 get bookmarks() { | 686 get bookmarks() { |
687 return this.bookmarks_; | 687 return this.bookmarks_; |
688 } | 688 } |
689 }; | 689 }; |
OLD | NEW |