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

Unified Diff: remoting/webapp/remoting.js

Issue 299983002: Remove the NPAPI plugin from the webapp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
« remoting/webapp/host_screen.js ('K') | « remoting/webapp/manifest.json.jinja2 ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/remoting.js
diff --git a/remoting/webapp/remoting.js b/remoting/webapp/remoting.js
index adc26a7630eb5b8682db100b57cecfd97c906ae9..52357f7422128ea0c95e1239eafc0dc2fc9f73a9 100644
--- a/remoting/webapp/remoting.js
+++ b/remoting/webapp/remoting.js
@@ -190,15 +190,14 @@ remoting.createNpapiPlugin = function(container) {
// Hiding the plugin means it doesn't load, so make it size zero instead.
plugin.width = 0;
plugin.height = 0;
- container.appendChild(plugin);
// Verify if the plugin was loaded successfully.
- if (!plugin.hasOwnProperty('REQUESTED_ACCESS_CODE')) {
- container.removeChild(plugin);
- return null;
+ if (plugin.hasOwnProperty('REQUESTED_ACCESS_CODE')) {
Sergey Ulanov 2014/05/24 01:50:34 Plugins are not loaded until they are added to DOM
+ container.appendChild(plugin);
+ return /** @type {remoting.HostPlugin} */ (plugin);
}
- return /** @type {remoting.HostPlugin} */ (plugin);
+ return null;
};
/**
« remoting/webapp/host_screen.js ('K') | « remoting/webapp/manifest.json.jinja2 ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698