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

Side by Side Diff: remoting/webapp/crd/js/crd_event_handlers.js

Issue 1020743002: [Chromoting] Move app-specific code out of remoting.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make isMe2MeInstallable private Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | remoting/webapp/crd/js/crd_main.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 6
7 /** @suppress {duplicate} */ 7 /** @suppress {duplicate} */
8 var remoting = remoting || {}; 8 var remoting = remoting || {};
9 9
10 remoting.initElementEventHandlers = function() { 10 remoting.initElementEventHandlers = function() {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 { event: 'click', id: 'sign-out', fn:remoting.signOut }, 77 { event: 'click', id: 'sign-out', fn:remoting.signOut },
78 { event: 'click', id: 'token-refresh-error-ok', fn: goHome }, 78 { event: 'click', id: 'token-refresh-error-ok', fn: goHome },
79 { event: 'click', id: 'token-refresh-error-sign-in', 79 { event: 'click', id: 'token-refresh-error-sign-in',
80 fn: remoting.handleAuthFailureAndRelaunch } 80 fn: remoting.handleAuthFailureAndRelaunch }
81 ]; 81 ];
82 registerEventListeners(it2me_actions); 82 registerEventListeners(it2me_actions);
83 registerEventListeners(me2me_actions); 83 registerEventListeners(me2me_actions);
84 registerEventListeners(host_actions); 84 registerEventListeners(host_actions);
85 registerEventListeners(auth_actions); 85 registerEventListeners(auth_actions);
86 } 86 }
87
88 /**
89 * Sign the user out of Chromoting by clearing (and revoking, if possible) the
90 * OAuth refresh token.
91 *
92 * Also clear all local storage, to avoid leaking information.
93 */
94 remoting.signOut = function() {
95 remoting.oauth2.removeCachedAuthToken().then(function(){
96 chrome.storage.local.clear();
97 remoting.setMode(remoting.AppMode.HOME);
98 window.location.reload();
99 });
100 };
101
OLDNEW
« no previous file with comments | « no previous file | remoting/webapp/crd/js/crd_main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698