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

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: 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 <include src="../../../../ui/webui/resources/js/util.js"> 7 <include src="../../../../ui/webui/resources/js/util.js">
8 <include src="open_pdf_params_parser.js"> 8 <include src="open_pdf_params_parser.js">
9 <include src="pdf_scripting_api.js"> 9 <include src="pdf_scripting_api.js">
10 <include src="viewport.js"> 10 <include src="viewport.js">
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 e.preventDefault(); 251 e.preventDefault();
252 } 252 }
253 return; 253 return;
254 case 80: // p key. 254 case 80: // p key.
255 if (e.ctrlKey || e.metaKey) { 255 if (e.ctrlKey || e.metaKey) {
256 this.print_(); 256 this.print_();
257 // Since we do the printing of the page. 257 // Since we do the printing of the page.
258 e.preventDefault(); 258 e.preventDefault();
259 } 259 }
260 return; 260 return;
261 case 219: // left bracket.
Lei Zhang 2014/09/18 20:41:06 nit: 2 spaces before //
Nikhil 2014/09/19 14:12:47 Done.
262 this.plugin_.postMessage({
263 type: 'rotateCounterclockwise',
264 });
265 return;
266 case 221: // right bracket.
267 this.plugin_.postMessage({
268 type: 'rotateClockwise',
269 });
270 return;
261 } 271 }
262 }, 272 },
263 273
264 /** 274 /**
265 * @private 275 * @private
266 * Notify the plugin to print. 276 * Notify the plugin to print.
267 */ 277 */
268 print_: function() { 278 print_: function() {
269 this.plugin_.postMessage({ 279 this.plugin_.postMessage({
270 type: 'print', 280 type: 'print',
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 578
569 /** 579 /**
570 * @type {Viewport} the viewport of the PDF viewer. 580 * @type {Viewport} the viewport of the PDF viewer.
571 */ 581 */
572 get viewport() { 582 get viewport() {
573 return this.viewport_; 583 return this.viewport_;
574 } 584 }
575 }; 585 };
576 586
577 var viewer = new PDFViewer(); 587 var viewer = new PDFViewer();
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