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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/pdf/pdf.js
diff --git a/chrome/browser/resources/pdf/pdf.js b/chrome/browser/resources/pdf/pdf.js
index 88e3d26bc5ee57ec2f9146b5605513fb2deda1ae..ff406973be98f1399a96aa2c817e992f18887094 100644
--- a/chrome/browser/resources/pdf/pdf.js
+++ b/chrome/browser/resources/pdf/pdf.js
@@ -397,10 +397,12 @@ PDFViewer.prototype = {
this.updateProgress_(message.data.progress);
break;
case 'navigate':
- if (message.data.newTab)
- window.open(message.data.url);
- else
- window.location.href = message.data.url;
+ if (message.data.newTab) {
+ chrome.tabs.create({ url: message.data.url });
+ } else {
+ chrome.tabs.update(
+ this.streamDetails.tabId, { url: message.data.url });
+ }
break;
case 'setScrollPosition':
var position = this.viewport_.position;
« 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