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

Side by Side Diff: chrome/browser/resources/pdf/pdf.js

Issue 838723003: Testcases for nameddests and navigate for PDF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nit. Created 5 years, 10 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 unified diff | Download patch
OLDNEW
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
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
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 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698