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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 break; | 403 break; |
404 case 'goToPage': | 404 case 'goToPage': |
405 this.viewport_.goToPage(message.data.page); | 405 this.viewport_.goToPage(message.data.page); |
406 break; | 406 break; |
407 case 'loadProgress': | 407 case 'loadProgress': |
408 this.updateProgress_(message.data.progress); | 408 this.updateProgress_(message.data.progress); |
409 break; | 409 break; |
410 case 'navigate': | 410 case 'navigate': |
411 // If in print preview, always open a new tab. | 411 // If in print preview, always open a new tab. |
412 if (this.isPrintPreview_) | 412 if (this.isPrintPreview_) |
413 this.navigate_(message.data.url, true); | 413 this.navigator_.navigate(message.data.url, true); |
414 else | 414 else |
415 this.navigator_.navigate(message.data.url, message.data.newTab); | 415 this.navigator_.navigate(message.data.url, message.data.newTab); |
416 break; | 416 break; |
417 case 'setNamedDestinations': | 417 case 'setNamedDestinations': |
418 this.paramsParser_.namedDestinations = message.data.namedDestinations; | 418 this.paramsParser_.namedDestinations = message.data.namedDestinations; |
419 break; | 419 break; |
420 case 'setScrollPosition': | 420 case 'setScrollPosition': |
421 var position = this.viewport_.position; | 421 var position = this.viewport_.position; |
422 if (message.data.x !== undefined) | 422 if (message.data.x !== undefined) |
423 position.x = message.data.x; | 423 position.x = message.data.x; |
(...skipping 256 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 |