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

Unified Diff: remoting/webapp/crd/js/desktop_remoting.js

Issue 789733010: [Chromoting] Remove initIdentityEmail. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 6 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 | « remoting/webapp/crd/js/crd_main.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/desktop_remoting.js
diff --git a/remoting/webapp/crd/js/desktop_remoting.js b/remoting/webapp/crd/js/desktop_remoting.js
index e875f7177443dbb2c6c457f69bdf31f64e568342..f4b83e8596aecc3e223192ed745b97996d2052d7 100644
--- a/remoting/webapp/crd/js/desktop_remoting.js
+++ b/remoting/webapp/crd/js/desktop_remoting.js
@@ -41,6 +41,21 @@ remoting.DesktopRemoting = function(app) {
};
/**
+ * Display the user's email address and allow access to the rest of the app,
+ * including parsing URL parameters.
+ *
+ * @param {string} email The user's email address.
+ * @param {string} fullName The user's full name. This is always null since
+ * CRD doesn't request userinfo.profile permission.
+ * @return {void} Nothing.
+ */
+remoting.onUserInfoAvailable = function(email, fullName) {
+ document.getElementById('current-email').innerText = email;
+ document.getElementById('get-started-it2me').disabled = false;
+ document.getElementById('get-started-me2me').disabled = false;
+};
+
+/**
* Initialize the application and register all event handlers. After this
* is called, the app is running and waiting for user events.
*
@@ -48,8 +63,7 @@ remoting.DesktopRemoting = function(app) {
*/
remoting.DesktopRemoting.prototype.init = function() {
remoting.initGlobalObjects();
- remoting.initIdentity();
- remoting.initIdentityEmail(remoting.onEmailAvailable);
+ remoting.initIdentity(remoting.onUserInfoAvailable);
remoting.initElementEventHandlers();
remoting.initGlobalEventHandlers();
« no previous file with comments | « remoting/webapp/crd/js/crd_main.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698