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

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

Issue 9903008: Added first-run infographic screens for IT2Me and Me2Me. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « remoting/webapp/_locales/en/messages.json ('k') | remoting/webapp/host_list.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 function onLoad() { 10 function onLoad() {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 { event: 'click', id: 'cancel-connect-button', 64 { event: 'click', id: 'cancel-connect-button',
65 fn: remoting.cancelConnect }, 65 fn: remoting.cancelConnect },
66 { event: 'click', id: 'toolbar-stub', 66 { event: 'click', id: 'toolbar-stub',
67 fn: function() { remoting.toolbar.toggle(); } }, 67 fn: function() { remoting.toolbar.toggle(); } },
68 { event: 'click', id: 'start-daemon', 68 { event: 'click', id: 'start-daemon',
69 fn: function() { remoting.askPinDialog.showForStart(); } }, 69 fn: function() { remoting.askPinDialog.showForStart(); } },
70 { event: 'click', id: 'change-daemon-pin', 70 { event: 'click', id: 'change-daemon-pin',
71 fn: function() { remoting.askPinDialog.showForPin(); } }, 71 fn: function() { remoting.askPinDialog.showForPin(); } },
72 { event: 'click', id: 'stop-daemon', fn: stopDaemon }, 72 { event: 'click', id: 'stop-daemon', fn: stopDaemon },
73 { event: 'submit', id: 'access-code-form', fn: sendAccessCode }, 73 { event: 'submit', id: 'access-code-form', fn: sendAccessCode },
74 { event: 'submit', id: 'pin-form', fn: connectHostWithPin } 74 { event: 'submit', id: 'pin-form', fn: connectHostWithPin },
75 { event: 'click', id: 'get-started-it2me',
76 fn: remoting.showIt2MeUiAndSave },
77 { event: 'click', id: 'get-started-me2me',
78 fn: remoting.showMe2MeUiAndSave }
75 ]; 79 ];
76 80
77 for (var i = 0; i < actions.length; ++i) { 81 for (var i = 0; i < actions.length; ++i) {
78 var action = actions[i]; 82 var action = actions[i];
79 var element = document.getElementById(action.id); 83 var element = document.getElementById(action.id);
80 if (element) { 84 if (element) {
81 element.addEventListener(action.event, action.fn, false); 85 element.addEventListener(action.event, action.fn, false);
82 } else { 86 } else {
83 console.error('Could not set ' + action.event + 87 console.error('Could not set ' + action.event +
84 ' event handler on element ' + action.id + 88 ' event handler on element ' + action.id +
85 ': element not found.'); 89 ': element not found.');
86 } 90 }
87 } 91 }
88 remoting.init(); 92 remoting.init();
89 } 93 }
90 94
91 function onBeforeUnload() { 95 function onBeforeUnload() {
92 return remoting.promptClose(); 96 return remoting.promptClose();
93 } 97 }
94 98
95 window.addEventListener('load', onLoad, false); 99 window.addEventListener('load', onLoad, false);
96 window.addEventListener('beforeunload', onBeforeUnload, false); 100 window.addEventListener('beforeunload', onBeforeUnload, false);
97 window.addEventListener('resize', remoting.onResize, false); 101 window.addEventListener('resize', remoting.onResize, false);
98 window.addEventListener('unload', remoting.disconnect, false); 102 window.addEventListener('unload', remoting.disconnect, false);
OLDNEW
« no previous file with comments | « remoting/webapp/_locales/en/messages.json ('k') | remoting/webapp/host_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698