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

Unified Diff: remoting/webapp/remoting.js

Issue 9664013: Hide daemon UI initially. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 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
« no previous file with comments | « remoting/webapp/main.html ('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 a8ca35e6cbf032898bded2e497f732a04126f468..15b0968a157dc5c8afc42de061fbfc3b9bb50452 100644
--- a/remoting/webapp/remoting.js
+++ b/remoting/webapp/remoting.js
@@ -53,6 +53,14 @@ remoting.init = function() {
window.addEventListener('blur', pluginLostFocus_, false);
+ if (isHostModeSupported_()) {
+ var noShare = document.getElementById('chrome-os-no-share');
+ noShare.parentNode.removeChild(noShare);
+ } else {
+ var button = document.getElementById('share-button');
+ button.disabled = true;
+ }
+
// Parse URL parameters.
var urlParams = getUrlParameters_();
if ('mode' in urlParams) {
@@ -64,17 +72,16 @@ remoting.init = function() {
}
// No valid URL parameters, start up normally.
+ remoting.initDaemonUi();
+};
+
+// initDaemonUi is called if the app is not starting up in session mode, and
+// also if the user cancels the connection in session mode.
+remoting.initDaemonUi = function () {
remoting.daemonPlugin = new remoting.DaemonPlugin();
remoting.daemonPlugin.updateDom();
remoting.setMode(getAppStartupMode_());
remoting.askPinDialog = new remoting.AskPinDialog(remoting.daemonPlugin);
- if (isHostModeSupported_()) {
- var noShare = document.getElementById('chrome-os-no-share');
- noShare.parentNode.removeChild(noShare);
- } else {
- var button = document.getElementById('share-button');
- button.disabled = true;
- }
};
/**
« no previous file with comments | « remoting/webapp/main.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698