| 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 return; | 284 return; |
| 285 case 65: // a key. | 285 case 65: // a key. |
| 286 if (e.ctrlKey || e.metaKey) { | 286 if (e.ctrlKey || e.metaKey) { |
| 287 this.plugin_.postMessage({ | 287 this.plugin_.postMessage({ |
| 288 type: 'selectAll' | 288 type: 'selectAll' |
| 289 }); | 289 }); |
| 290 // Since we do selection ourselves. | 290 // Since we do selection ourselves. |
| 291 e.preventDefault(); | 291 e.preventDefault(); |
| 292 } | 292 } |
| 293 return; | 293 return; |
| 294 case 71: // g key. |
| 295 if (this.isMaterial_ && (e.ctrlKey || e.metaKey)) { |
| 296 this.pageIndicator_.select(); |
| 297 // To prevent the default "find text" behaviour in Chrome. |
| 298 e.preventDefault(); |
| 299 } |
| 300 return; |
| 294 case 80: // p key. | 301 case 80: // p key. |
| 295 if (e.ctrlKey || e.metaKey) { | 302 if (e.ctrlKey || e.metaKey) { |
| 296 this.print_(); | 303 this.print_(); |
| 297 // Since we do the printing of the page. | 304 // Since we do the printing of the page. |
| 298 e.preventDefault(); | 305 e.preventDefault(); |
| 299 } | 306 } |
| 300 return; | 307 return; |
| 301 case 219: // left bracket. | 308 case 219: // left bracket. |
| 302 if (e.ctrlKey) { | 309 if (e.ctrlKey) { |
| 303 this.plugin_.postMessage({ | 310 this.plugin_.postMessage({ |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 * Each bookmark is an Object containing a: | 742 * Each bookmark is an Object containing a: |
| 736 * - title | 743 * - title |
| 737 * - page (optional) | 744 * - page (optional) |
| 738 * - array of children (themselves bookmarks) | 745 * - array of children (themselves bookmarks) |
| 739 * @type {Array} the top-level bookmarks of the PDF. | 746 * @type {Array} the top-level bookmarks of the PDF. |
| 740 */ | 747 */ |
| 741 get bookmarks() { | 748 get bookmarks() { |
| 742 return this.bookmarks_; | 749 return this.bookmarks_; |
| 743 } | 750 } |
| 744 }; | 751 }; |
| OLD | NEW |