Index: chrome/browser/resources/pdf/pdf.js |
diff --git a/chrome/browser/resources/pdf/pdf.js b/chrome/browser/resources/pdf/pdf.js |
index 8d2ae0a7c09db35da2c13c5b051a8211a3cc0912..6879e5fb8daf8e3fab6d3f2f35929e32f995fa16 100644 |
--- a/chrome/browser/resources/pdf/pdf.js |
+++ b/chrome/browser/resources/pdf/pdf.js |
@@ -71,6 +71,8 @@ function PDFViewer(streamDetails) { |
// positioning, acting as a viewport. The plugin renders into this viewport |
// according to the scroll position of the window. |
this.plugin_ = document.createElement('embed'); |
+ console.log('created plugin ' + this.plugin_ + ' ' + |
+ this.plugin_.postMessage); |
// NOTE: The plugin's 'id' field must be set to 'plugin' since |
// chrome/renderer/printing/print_web_view_helper.cc actually references it. |
this.plugin_.id = 'plugin'; |
@@ -97,6 +99,8 @@ function PDFViewer(streamDetails) { |
if (!this.streamDetails_.embedded) |
this.plugin_.setAttribute('full-frame', ''); |
document.body.appendChild(this.plugin_); |
+ console.log('added plugin to DOM ' + this.plugin_ + ' ' + |
+ this.plugin_.postMessage); |
// Setup the button event listeners. |
$('fit-to-width-button').addEventListener('click', |
@@ -404,7 +408,7 @@ PDFViewer.prototype = { |
this.errorScreen_.text = message.data.loadFailedString; |
break; |
case 'cancelStreamUrl': |
- chrome.streamsPrivate.abort(this.streamDetails_.streamUrl); |
+ chrome.mimeHandlerPrivate.abortStream(); |
break; |
} |
}, |
@@ -433,6 +437,7 @@ PDFViewer.prototype = { |
chrome.tabs.setZoom(this.streamDetails_.tabId, zoom, |
this.setZoomComplete_.bind(this, zoom)); |
} |
+ console.log('afterZoom_ ' + this.plugin_ + ' ' + this.plugin_.postMessage); |
this.plugin_.postMessage({ |
type: 'viewport', |
zoom: zoom, |