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

Unified Diff: remoting/webapp/toolbar.js

Issue 158113002: [Chromoting] Break up JS event handler registration into related groups. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix alpha order Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/event_handlers.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/toolbar.js
diff --git a/remoting/webapp/toolbar.js b/remoting/webapp/toolbar.js
index 31a5f70e304762cd2012f1e503abde0ddb06dd94..f71bc3d011a363070f60e30ef87c8951108cbb35 100644
--- a/remoting/webapp/toolbar.js
+++ b/remoting/webapp/toolbar.js
@@ -46,6 +46,17 @@ remoting.Toolbar = function(toolbar) {
window.addEventListener('mousemove', remoting.Toolbar.onMouseMove, false);
window.addEventListener('resize', this.center.bind(this), false);
+ registerEventListener('new-connection', 'click',
+ function() {
+ chrome.app.window.create('main.html', { 'width': 800, 'height': 600 });
+ });
+ registerEventListener('send-ctrl-alt-del', 'click', remoting.sendCtrlAltDel);
+ registerEventListener('send-print-screen', 'click', remoting.sendPrintScreen);
+ registerEventListener('sign-out', 'click', remoting.signOut);
+ registerEventListener('toolbar-disconnect', 'click', remoting.disconnect);
+ registerEventListener('toolbar-stub', 'click',
+ function() { remoting.toolbar.toggle(); });
+
// Prevent the preview canceling if the user is interacting with the tool-bar.
/** @type {remoting.Toolbar} */
var that = this;
« no previous file with comments | « remoting/webapp/event_handlers.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698