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

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

Issue 787223005: Fix navigations in OOP PDF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 else 390 else
391 this.passwordScreen_.deny(); 391 this.passwordScreen_.deny();
392 break; 392 break;
393 case 'goToPage': 393 case 'goToPage':
394 this.viewport_.goToPage(message.data.page); 394 this.viewport_.goToPage(message.data.page);
395 break; 395 break;
396 case 'loadProgress': 396 case 'loadProgress':
397 this.updateProgress_(message.data.progress); 397 this.updateProgress_(message.data.progress);
398 break; 398 break;
399 case 'navigate': 399 case 'navigate':
400 if (message.data.newTab) 400 if (message.data.newTab) {
401 window.open(message.data.url); 401 chrome.tabs.create({ url: message.data.url });
402 else 402 } else {
403 window.location.href = message.data.url; 403 chrome.tabs.update(
404 this.streamDetails.tabId, { url: message.data.url });
405 }
404 break; 406 break;
405 case 'setScrollPosition': 407 case 'setScrollPosition':
406 var position = this.viewport_.position; 408 var position = this.viewport_.position;
407 if (message.data.x != undefined) 409 if (message.data.x != undefined)
408 position.x = message.data.x; 410 position.x = message.data.x;
409 if (message.data.y != undefined) 411 if (message.data.y != undefined)
410 position.y = message.data.y; 412 position.y = message.data.y;
411 this.viewport_.position = position; 413 this.viewport_.position = position;
412 break; 414 break;
413 case 'setTranslatedStrings': 415 case 'setTranslatedStrings':
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 this.streamDetails.tabId != -1); 605 this.streamDetails.tabId != -1);
604 }, 606 },
605 607
606 /** 608 /**
607 * @type {Viewport} the viewport of the PDF viewer. 609 * @type {Viewport} the viewport of the PDF viewer.
608 */ 610 */
609 get viewport() { 611 get viewport() {
610 return this.viewport_; 612 return this.viewport_;
611 } 613 }
612 }; 614 };
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