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

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

Issue 863863005: Prevent the default select-all behavior from happening in OOP PDF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 if (fromScriptingAPI) { 239 if (fromScriptingAPI) {
240 position.y += Viewport.SCROLL_INCREMENT; 240 position.y += Viewport.SCROLL_INCREMENT;
241 this.viewport.position = position; 241 this.viewport.position = position;
242 } 242 }
243 return; 243 return;
244 case 65: // a key. 244 case 65: // a key.
245 if (e.ctrlKey || e.metaKey) { 245 if (e.ctrlKey || e.metaKey) {
246 this.plugin_.postMessage({ 246 this.plugin_.postMessage({
247 type: 'selectAll' 247 type: 'selectAll'
248 }); 248 });
249 // Since we do selection ourselves.
250 e.preventDefault();
249 } 251 }
250 return; 252 return;
251 case 80: // p key. 253 case 80: // p key.
252 if (e.ctrlKey || e.metaKey) { 254 if (e.ctrlKey || e.metaKey) {
253 this.print_(); 255 this.print_();
254 // Since we do the printing of the page. 256 // Since we do the printing of the page.
255 e.preventDefault(); 257 e.preventDefault();
256 } 258 }
257 return; 259 return;
258 case 219: // left bracket. 260 case 219: // left bracket.
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 * Each bookmark is an Object containing a: 682 * Each bookmark is an Object containing a:
681 * - title 683 * - title
682 * - page (optional) 684 * - page (optional)
683 * - array of children (themselves bookmarks) 685 * - array of children (themselves bookmarks)
684 * @type {Array} the top-level bookmarks of the PDF. 686 * @type {Array} the top-level bookmarks of the PDF.
685 */ 687 */
686 get bookmarks() { 688 get bookmarks() {
687 return this.bookmarks_; 689 return this.bookmarks_;
688 } 690 }
689 }; 691 };
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