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

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

Issue 1521913002: PDF: Delete non-material viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « chrome/browser/resources/pdf/pdf.js ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/pdf/pdf_scripting_api.js
diff --git a/chrome/browser/resources/pdf/pdf_scripting_api.js b/chrome/browser/resources/pdf/pdf_scripting_api.js
index 06fc8b546c4ab15d308a6748e4738729bb41549d..356edcdbce2472a49de2820c445b2f55653c0748 100644
--- a/chrome/browser/resources/pdf/pdf_scripting_api.js
+++ b/chrome/browser/resources/pdf/pdf_scripting_api.js
@@ -274,23 +274,12 @@ function PDFCreateOutOfProcessPlugin(src) {
// Prevent the frame from being tab-focusable.
iframe.setAttribute('tabindex', '-1');
- // TODO(raymes): This below is a hack to tell if the material design PDF UI
- // has been enabled. Remove this as soon as we remove the material design PDF
- // flag.
- var EXTENSION_URL = 'chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/';
- var PAGE_NAME = 'index.html';
- var MATERIAL_PAGE_NAME = 'index-material.html';
- fetch(EXTENSION_URL + PAGE_NAME, {
- method: 'get'
- }).then(function() {
- iframe.setAttribute('src', EXTENSION_URL + PAGE_NAME + '?' + src);
- }, function() {
- iframe.setAttribute('src', EXTENSION_URL + MATERIAL_PAGE_NAME + '?' + src);
- }).then(function() {
- iframe.onload = function() {
- client.setPlugin(iframe.contentWindow);
- };
- });
+ var EXTENSION_URL =
+ 'chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index-material.html';
+ iframe.setAttribute('src', EXTENSION_URL + '?' + src);
+ iframe.onload = function() {
+ client.setPlugin(iframe.contentWindow);
+ };
// Add the functions to the iframe so that they can be called directly.
iframe.setViewportChangedCallback =
« no previous file with comments | « chrome/browser/resources/pdf/pdf.js ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698