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

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

Issue 9129009: Change tool-bar behaviour to click-to-show. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 10 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/client_screen.js ('k') | remoting/webapp/toolbar.css » ('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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 { event: 'click', id: 'access-mode-button', fn: goEnterAccessCode }, 47 { event: 'click', id: 'access-mode-button', fn: goEnterAccessCode },
48 { event: 'click', id: 'cancel-share-button', fn: remoting.cancelShare }, 48 { event: 'click', id: 'cancel-share-button', fn: remoting.cancelShare },
49 { event: 'click', id: 'host-finished-button', fn: goHome }, 49 { event: 'click', id: 'host-finished-button', fn: goHome },
50 { event: 'click', id: 'client-cancel-button', fn: goHome }, 50 { event: 'click', id: 'client-cancel-button', fn: goHome },
51 { event: 'click', id: 'client-finished-it2me-button', 51 { event: 'click', id: 'client-finished-it2me-button',
52 fn: goFinishedIt2Me }, 52 fn: goFinishedIt2Me },
53 { event: 'click', id: 'client-finished-me2me-button', fn: goHome }, 53 { event: 'click', id: 'client-finished-me2me-button', fn: goHome },
54 { event: 'click', id: 'client-reconnect-button', fn: reload }, 54 { event: 'click', id: 'client-reconnect-button', fn: reload },
55 { event: 'click', id: 'cancel-button', 55 { event: 'click', id: 'cancel-button',
56 fn: remoting.cancelPendingOperation }, 56 fn: remoting.cancelPendingOperation },
57 { event: 'click', id: 'toolbar-stub',
58 fn: function() { remoting.toolbar.toggle(); } },
57 { event: 'submit', id: 'access-code-form', fn: sendAccessCode }, 59 { event: 'submit', id: 'access-code-form', fn: sendAccessCode },
58 { event: 'submit', id: 'pin-form', fn: connectHostWithPin } 60 { event: 'submit', id: 'pin-form', fn: connectHostWithPin }
59 ]; 61 ];
60 62
61 for (var i = 0; i < actions.length; ++i) { 63 for (var i = 0; i < actions.length; ++i) {
62 var action = actions[i]; 64 var action = actions[i];
63 var element = document.getElementById(action.id); 65 var element = document.getElementById(action.id);
64 if (element) { 66 if (element) {
65 element.addEventListener(action.event, action.fn, false); 67 element.addEventListener(action.event, action.fn, false);
66 } else { 68 } else {
67 console.error('Could not set ' + action.id + 69 console.error('Could not set ' + action.id +
68 ' event handler on element ' + action.event + 70 ' event handler on element ' + action.event +
69 ': element not found.'); 71 ': element not found.');
70 } 72 }
71 } 73 }
72 remoting.init(); 74 remoting.init();
73 } 75 }
74 76
75 function onBeforeUnload() { 77 function onBeforeUnload() {
76 return remoting.promptClose(); 78 return remoting.promptClose();
77 } 79 }
78 80
79 window.addEventListener('load', onLoad, false); 81 window.addEventListener('load', onLoad, false);
80 window.addEventListener('beforeunload', onBeforeUnload, false); 82 window.addEventListener('beforeunload', onBeforeUnload, false);
81 window.addEventListener('resize', remoting.onResize, false); 83 window.addEventListener('resize', remoting.onResize, false);
82 window.addEventListener('unload', remoting.disconnect, false); 84 window.addEventListener('unload', remoting.disconnect, false);
OLDNEW
« no previous file with comments | « remoting/webapp/client_screen.js ('k') | remoting/webapp/toolbar.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698