| 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 case 65: // a key. | 373 case 65: // a key. |
| 374 if (e.ctrlKey || e.metaKey) { | 374 if (e.ctrlKey || e.metaKey) { |
| 375 this.plugin_.postMessage({ | 375 this.plugin_.postMessage({ |
| 376 type: 'selectAll' | 376 type: 'selectAll' |
| 377 }); | 377 }); |
| 378 // Since we do selection ourselves. | 378 // Since we do selection ourselves. |
| 379 e.preventDefault(); | 379 e.preventDefault(); |
| 380 } | 380 } |
| 381 return; | 381 return; |
| 382 case 71: // g key. | 382 case 71: // g key. |
| 383 if (this.materialToolbar_ && (e.ctrlKey || e.metaKey)) { | 383 if (this.materialToolbar_ && (e.ctrlKey || e.metaKey) && e.altKey) { |
| 384 this.toolbarManager_.showToolbars(); | 384 this.toolbarManager_.showToolbars(); |
| 385 this.materialToolbar_.selectPageNumber(); | 385 this.materialToolbar_.selectPageNumber(); |
| 386 // To prevent the default "find text" behaviour in Chrome. | |
| 387 e.preventDefault(); | |
| 388 } | 386 } |
| 389 return; | 387 return; |
| 390 case 219: // left bracket. | 388 case 219: // left bracket. |
| 391 if (e.ctrlKey) | 389 if (e.ctrlKey) |
| 392 this.rotateCounterClockwise_(); | 390 this.rotateCounterClockwise_(); |
| 393 return; | 391 return; |
| 394 case 221: // right bracket. | 392 case 221: // right bracket. |
| 395 if (e.ctrlKey) | 393 if (e.ctrlKey) |
| 396 this.rotateClockwise_(); | 394 this.rotateClockwise_(); |
| 397 return; | 395 return; |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 874 * Each bookmark is an Object containing a: | 872 * Each bookmark is an Object containing a: |
| 875 * - title | 873 * - title |
| 876 * - page (optional) | 874 * - page (optional) |
| 877 * - array of children (themselves bookmarks) | 875 * - array of children (themselves bookmarks) |
| 878 * @type {Array} the top-level bookmarks of the PDF. | 876 * @type {Array} the top-level bookmarks of the PDF. |
| 879 */ | 877 */ |
| 880 get bookmarks() { | 878 get bookmarks() { |
| 881 return this.bookmarks_; | 879 return this.bookmarks_; |
| 882 } | 880 } |
| 883 }; | 881 }; |
| OLD | NEW |