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

Unified Diff: remoting/webapp/host_screen.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
Index: remoting/webapp/host_screen.js
diff --git a/remoting/webapp/host_screen.js b/remoting/webapp/host_screen.js
index 71446ae86ca410ee005dca72efc59ea37d514dd2..285fa9958520ff1018d89eaeacb47cfae9514a59 100644
--- a/remoting/webapp/host_screen.js
+++ b/remoting/webapp/host_screen.js
@@ -44,26 +44,10 @@ remoting.tryShare = function() {
document.getElementById('host-plugin-container'));
}
- /** @param {remoting.HostController.AsyncResult} asyncResult */
- var onHostInstalled = function(asyncResult) {
- if (asyncResult == remoting.HostController.AsyncResult.OK) {
- tryInitializeDispatcher();
- } else if (asyncResult == remoting.HostController.AsyncResult.CANCELLED) {
- onInstallError(remoting.Error.CANCELLED);
- } else {
- onInstallError(remoting.Error.UNEXPECTED);
- }
- };
-
var onDispatcherInitialized = function () {
if (hostDispatcher.usingNpapi()) {
hostInstallDialog = new remoting.HostInstallDialog();
- if (navigator.platform == 'Win32') {
- hostInstallDialog.show(
- hostDispatcher.getNpapiHost(), onHostInstalled, onInstallError);
- } else {
- hostInstallDialog.show(null, onHostInstalled, onInstallError);
- }
+ hostInstallDialog.show(tryInitializeDispatcher, onInstallError);
} else {
// Host alrady installed.
remoting.startHostUsingDispatcher_(hostDispatcher);
@@ -82,10 +66,9 @@ remoting.tryShare = function() {
if (hostInstallDialog == null) {
hostInstallDialog = new remoting.HostInstallDialog();
- (/** @type {remoting.HostInstallDialog} */ hostInstallDialog).show(
- null, onHostInstalled, onInstallError);
+ hostInstallDialog.show(tryInitializeDispatcher, onInstallError);
Sergey Ulanov 2014/05/24 01:50:34 does this still typecheck, without the type annota
} else {
- (/** @type {remoting.HostInstallDialog} */ hostInstallDialog).tryAgain();
+ hostInstallDialog.tryAgain();
}
};

Powered by Google App Engine
This is Rietveld 408576698