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

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

Issue 581913003: PDF Viewer - Add keyboard shortcuts for rotation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback (nit fix) Created 6 years, 3 months 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 | pdf/instance.cc » ('j') | 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 e.preventDefault(); 227 e.preventDefault();
228 } 228 }
229 return; 229 return;
230 case 80: // p key. 230 case 80: // p key.
231 if (e.ctrlKey || e.metaKey) { 231 if (e.ctrlKey || e.metaKey) {
232 this.print_(); 232 this.print_();
233 // Since we do the printing of the page. 233 // Since we do the printing of the page.
234 e.preventDefault(); 234 e.preventDefault();
235 } 235 }
236 return; 236 return;
237 case 219: // left bracket.
238 this.plugin_.postMessage({
239 type: 'rotateCounterclockwise',
240 });
241 return;
242 case 221: // right bracket.
243 this.plugin_.postMessage({
244 type: 'rotateClockwise',
245 });
246 return;
237 } 247 }
238 }, 248 },
239 249
240 /** 250 /**
241 * @private 251 * @private
242 * Notify the plugin to print. 252 * Notify the plugin to print.
243 */ 253 */
244 print_: function() { 254 print_: function() {
245 this.plugin_.postMessage({ 255 this.plugin_.postMessage({
246 type: 'print', 256 type: 'print',
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 window.parent.postMessage(message, '*'); 552 window.parent.postMessage(message, '*');
543 }, 553 },
544 554
545 /** 555 /**
546 * @type {Viewport} the viewport of the PDF viewer. 556 * @type {Viewport} the viewport of the PDF viewer.
547 */ 557 */
548 get viewport() { 558 get viewport() {
549 return this.viewport_; 559 return this.viewport_;
550 } 560 }
551 }; 561 };
OLDNEW
« no previous file with comments | « no previous file | pdf/instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698