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

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

Issue 779613003: [Chromoting] Create core Application interface for CRD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync 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 unified diff | Download patch
« no previous file with comments | « remoting/webapp/crd/js/desktop_remoting.js ('k') | remoting/webapp/crd/js/session_connector.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 18 matching lines...) Expand all
29 goHome(); 29 goHome();
30 } 30 }
31 }; 31 };
32 /** @param {Event} event The event. */ 32 /** @param {Event} event The event. */
33 var sendAccessCode = function(event) { 33 var sendAccessCode = function(event) {
34 remoting.connectIT2Me(); 34 remoting.connectIT2Me();
35 event.preventDefault(); 35 event.preventDefault();
36 }; 36 };
37 var reconnect = function() { 37 var reconnect = function() {
38 remoting.setMode(remoting.AppMode.CLIENT_CONNECTING); 38 remoting.setMode(remoting.AppMode.CLIENT_CONNECTING);
39 remoting.connector.reconnect(); 39 remoting.app.getSessionConnector().reconnect();
40 }; 40 };
41 var doAuthRedirect = function() { 41 var doAuthRedirect = function() {
42 if (!base.isAppsV2()) { 42 if (!base.isAppsV2()) {
43 remoting.oauth2.doAuthRedirect(function() { 43 remoting.oauth2.doAuthRedirect(function() {
44 window.location.reload(); 44 window.location.reload();
45 }); 45 });
46 } 46 }
47 }; 47 };
48 var fixAuthError = function() { 48 var fixAuthError = function() {
49 if (base.isAppsV2()) { 49 if (base.isAppsV2()) {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 function registerEventListener(id, eventname, fn) { 151 function registerEventListener(id, eventname, fn) {
152 var element = document.getElementById(id); 152 var element = document.getElementById(id);
153 if (element) { 153 if (element) {
154 element.addEventListener(eventname, fn, false); 154 element.addEventListener(eventname, fn, false);
155 } else { 155 } else {
156 console.error('Could not set ' + eventname + 156 console.error('Could not set ' + eventname +
157 ' event handler on element ' + id + 157 ' event handler on element ' + id +
158 ': element not found.'); 158 ': element not found.');
159 } 159 }
160 } 160 }
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/desktop_remoting.js ('k') | remoting/webapp/crd/js/session_connector.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698