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

Unified Diff: chrome/browser/resources/pdf/navigator.js

Issue 1350073002: PDFs viewed inside a <webview> should navigate the same as PDFs in tabs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass tabId to Navigator() instead of browserApi_. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/pdf/navigator.js
diff --git a/chrome/browser/resources/pdf/navigator.js b/chrome/browser/resources/pdf/navigator.js
index e6bd7ad28c4531d2fe846a35ae0cc0cdd0cea6fa..6ce5edde23d1adbb91fa26a601e7c84b583a2ad3 100644
--- a/chrome/browser/resources/pdf/navigator.js
+++ b/chrome/browser/resources/pdf/navigator.js
@@ -6,6 +6,7 @@
/**
* Creates a new Navigator for navigating to links inside or outside the PDF.
+ * @param {int} tabId of browser tab containing viewer, -1 if in <webview>
* @param {string} originalUrl The original page URL.
* @param {Object} viewport The viewport info of the page.
* @param {Object} paramsParser The object for URL parsing.
@@ -14,11 +15,13 @@
* @param {Function} navigateInNewTabCallback The Callback function that gets
* called when navigation happens in the new tab.
*/
-function Navigator(originalUrl,
+function Navigator(tabId,
+ originalUrl,
viewport,
paramsParser,
navigateInCurrentTabCallback,
navigateInNewTabCallback) {
+ this.tabId_ = tabId;
this.originalUrl_ = originalUrl;
this.viewport_ = viewport;
this.paramsParser_ = paramsParser;

Powered by Google App Engine
This is Rietveld 408576698