| 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..198078b621d3f67abff047182f5dbc3aff39a840 100644
|
| --- a/chrome/browser/resources/pdf/pdf.js
|
| +++ b/chrome/browser/resources/pdf/pdf.js
|
| @@ -65,18 +65,11 @@ function PDFViewer(streamDetails) {
|
| this.beforeZoom_.bind(this),
|
| this.afterZoom_.bind(this),
|
| getScrollbarWidth());
|
| - var isPrintPreview =
|
| - this.streamDetails.originalUrl.indexOf('chrome://print') == 0;
|
| // Create the plugin object dynamically so we can set its src. The plugin
|
| // element is sized to fill the entire window and is set to be fixed
|
| // positioning, acting as a viewport. The plugin renders into this viewport
|
| // according to the scroll position of the window.
|
| - //
|
| - // TODO(sammc): Remove special casing for print preview. This is currently
|
| - // necessary because setting the src for an embed element triggers origin
|
| - // checking and the PDF extension is not allowed to embed URLs with a scheme
|
| - // of "chrome", which is used by print preview.
|
| - this.plugin_ = document.createElement(isPrintPreview ? 'object' : 'embed');
|
| + this.plugin_ = document.createElement('embed');
|
| // 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';
|
|
|