Index: chrome/browser/resources/pdf/browser_api.js |
diff --git a/chrome/browser/resources/pdf/browser_api.js b/chrome/browser/resources/pdf/browser_api.js |
index 90033b84085322370cabe103d2970fd738817a56..10a4ad370296f56697378b4390354080add48e2c 100644 |
--- a/chrome/browser/resources/pdf/browser_api.js |
+++ b/chrome/browser/resources/pdf/browser_api.js |
@@ -206,7 +206,7 @@ function createBrowserApiForStandaloneExtension() { |
* current environment. |
*/ |
function createBrowserApi() { |
- if (window.location.search) |
+ if (location.search && location.ancestorOrigins[0] === 'chrome://print') |
raymes
2016/10/11 06:24:44
Do we need the window.location.search check too?
robwu
2016/10/11 21:05:38
Yes. When loaded inside the plugin location.ancest
|
return createBrowserApiForStandaloneExtension(); |
return createBrowserApiForMimeHandlerView(); |