Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: chrome/browser/resources/pdf/pdf.js

Issue 1530573002: PDF: Add alt/option key to Go To Page keyboard shortcut (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pdf_remove_non_material
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698