| 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 e.preventDefault(); | 306 e.preventDefault(); |
| 307 } | 307 } |
| 308 return; | 308 return; |
| 309 case 71: // g key. | 309 case 71: // g key. |
| 310 if (this.isMaterial_ && (e.ctrlKey || e.metaKey)) { | 310 if (this.isMaterial_ && (e.ctrlKey || e.metaKey)) { |
| 311 this.materialToolbar_.selectPageNumber(); | 311 this.materialToolbar_.selectPageNumber(); |
| 312 // To prevent the default "find text" behaviour in Chrome. | 312 // To prevent the default "find text" behaviour in Chrome. |
| 313 e.preventDefault(); | 313 e.preventDefault(); |
| 314 } | 314 } |
| 315 return; | 315 return; |
| 316 case 80: // p key. | |
| 317 if (e.ctrlKey || e.metaKey) { | |
| 318 this.print_(); | |
| 319 // Since we do the printing of the page. | |
| 320 e.preventDefault(); | |
| 321 } | |
| 322 return; | |
| 323 case 219: // left bracket. | 316 case 219: // left bracket. |
| 324 if (e.ctrlKey) | 317 if (e.ctrlKey) |
| 325 this.rotateCounterClockwise_(); | 318 this.rotateCounterClockwise_(); |
| 326 return; | 319 return; |
| 327 case 221: // right bracket. | 320 case 221: // right bracket. |
| 328 if (e.ctrlKey) | 321 if (e.ctrlKey) |
| 329 this.rotateClockwise_(); | 322 this.rotateClockwise_(); |
| 330 return; | 323 return; |
| 331 } | 324 } |
| 332 | 325 |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 * Each bookmark is an Object containing a: | 795 * Each bookmark is an Object containing a: |
| 803 * - title | 796 * - title |
| 804 * - page (optional) | 797 * - page (optional) |
| 805 * - array of children (themselves bookmarks) | 798 * - array of children (themselves bookmarks) |
| 806 * @type {Array} the top-level bookmarks of the PDF. | 799 * @type {Array} the top-level bookmarks of the PDF. |
| 807 */ | 800 */ |
| 808 get bookmarks() { | 801 get bookmarks() { |
| 809 return this.bookmarks_; | 802 return this.bookmarks_; |
| 810 } | 803 } |
| 811 }; | 804 }; |
| OLD | NEW |