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

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

Issue 2299943002: Record the PDF and top level URL when the PDF plugin crashes. (Closed)
Patch Set: Created 4 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/pdf.js
diff --git a/chrome/browser/resources/pdf/pdf.js b/chrome/browser/resources/pdf/pdf.js
index c7b172078d7778472af64c4fe851a35bca15b73e..a71af583285105c945178858641a53f0937fdd38 100644
--- a/chrome/browser/resources/pdf/pdf.js
+++ b/chrome/browser/resources/pdf/pdf.js
@@ -202,8 +202,12 @@ function PDFViewer(browserApi) {
this.plugin_.setAttribute('background-color', backgroundColor);
this.plugin_.setAttribute('top-toolbar-height', topToolbarHeight);
- if (!this.browserApi_.getStreamInfo().embedded)
+ if (this.browserApi_.getStreamInfo().embedded) {
+ this.plugin_.setAttribute('embedder-url',
raymes 2016/09/05 04:11:47 I think top-level-url may be more accurate here (t
Lei Zhang 2016/09/07 00:12:39 Done in all the places.
+ this.browserApi_.getStreamInfo().tabUrl);
+ } else {
this.plugin_.setAttribute('full-frame', '');
raymes 2016/09/05 04:11:47 optional: We could merge this with top-level-url a
Lei Zhang 2016/09/07 00:12:38 Can we ever be embedded, but have an empty top-lev
+ }
document.body.appendChild(this.plugin_);
// Setup the button event listeners.

Powered by Google App Engine
This is Rietveld 408576698