Chromium Code Reviews| 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 245 this.viewport.position = position; | 245 this.viewport.position = position; |
| 246 } | 246 } |
| 247 return; | 247 return; |
| 248 case 65: // a key. | 248 case 65: // a key. |
| 249 if (e.ctrlKey || e.metaKey) { | 249 if (e.ctrlKey || e.metaKey) { |
| 250 this.plugin_.postMessage({ | 250 this.plugin_.postMessage({ |
| 251 type: 'selectAll' | 251 type: 'selectAll' |
| 252 }); | 252 }); |
| 253 } | 253 } |
| 254 return; | 254 return; |
| 255 case 71: // g key. | |
| 256 if (this.isMaterial_ && (e.ctrlKey || e.metaKey)) { | |
| 257 this.pageIndicator_.select(); | |
| 258 // Since this is bound to Find Text. | |
|
raymes
2015/02/01 23:47:02
// To prevent the default "find text" behavior in
Alexandre Carlton
2015/02/02 00:05:32
Done.
| |
| 259 e.preventDefault(); | |
| 260 } | |
| 261 return; | |
| 255 case 80: // p key. | 262 case 80: // p key. |
| 256 if (e.ctrlKey || e.metaKey) { | 263 if (e.ctrlKey || e.metaKey) { |
| 257 this.print_(); | 264 this.print_(); |
| 258 // Since we do the printing of the page. | 265 // Since we do the printing of the page. |
| 259 e.preventDefault(); | 266 e.preventDefault(); |
| 260 } | 267 } |
| 261 return; | 268 return; |
| 262 case 219: // left bracket. | 269 case 219: // left bracket. |
| 263 if (e.ctrlKey) { | 270 if (e.ctrlKey) { |
| 264 this.plugin_.postMessage({ | 271 this.plugin_.postMessage({ |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 694 * Each bookmark is an Object containing a: | 701 * Each bookmark is an Object containing a: |
| 695 * - title | 702 * - title |
| 696 * - page (optional) | 703 * - page (optional) |
| 697 * - array of children (themselves bookmarks) | 704 * - array of children (themselves bookmarks) |
| 698 * @type {Array} the top-level bookmarks of the PDF. | 705 * @type {Array} the top-level bookmarks of the PDF. |
| 699 */ | 706 */ |
| 700 get bookmarks() { | 707 get bookmarks() { |
| 701 return this.bookmarks_; | 708 return this.bookmarks_; |
| 702 } | 709 } |
| 703 }; | 710 }; |
| OLD | NEW |