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

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

Issue 339613003: Remove the blue tool-bar for apps v2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made unit-tests side-effect-free. Created 6 years, 5 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 | « remoting/webapp/remoting.js ('k') | remoting/webapp/unittests/menu_button_unittest.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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Class representing the client tool-bar. 7 * Class representing the client tool-bar.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 this.stubRight_ = 0; 44 this.stubRight_ = 0;
45 /** 45 /**
46 * @type {remoting.OptionsMenu} 46 * @type {remoting.OptionsMenu}
47 * @private 47 * @private
48 */ 48 */
49 this.optionsMenu_ = new remoting.OptionsMenu( 49 this.optionsMenu_ = new remoting.OptionsMenu(
50 document.getElementById('send-ctrl-alt-del'), 50 document.getElementById('send-ctrl-alt-del'),
51 document.getElementById('send-print-screen'), 51 document.getElementById('send-print-screen'),
52 document.getElementById('screen-resize-to-client'), 52 document.getElementById('screen-resize-to-client'),
53 document.getElementById('screen-shrink-to-fit'), 53 document.getElementById('screen-shrink-to-fit'),
54 document.getElementById('new-connection'),
54 document.getElementById('toggle-full-screen')); 55 document.getElementById('toggle-full-screen'));
55 56
56 window.addEventListener('mousemove', remoting.Toolbar.onMouseMove, false); 57 window.addEventListener('mousemove', remoting.Toolbar.onMouseMove, false);
57 window.addEventListener('resize', this.center.bind(this), false); 58 window.addEventListener('resize', this.center.bind(this), false);
58 59
59 registerEventListener('new-connection', 'click',
60 function() {
61 chrome.app.window.create('main.html', {
62 'width': 800,
63 'height': 600,
64 'frame': "none"
65 });
66 });
67 registerEventListener('toolbar-disconnect', 'click', remoting.disconnect); 60 registerEventListener('toolbar-disconnect', 'click', remoting.disconnect);
68 registerEventListener('toolbar-stub', 'click', 61 registerEventListener('toolbar-stub', 'click',
69 function() { remoting.toolbar.toggle(); }); 62 function() { remoting.toolbar.toggle(); });
70 63
71 // Prevent the preview canceling if the user is interacting with the tool-bar. 64 // Prevent the preview canceling if the user is interacting with the tool-bar.
72 /** @type {remoting.Toolbar} */ 65 /** @type {remoting.Toolbar} */
73 var that = this; 66 var that = this;
74 var stopTimer = function() { 67 var stopTimer = function() {
75 if (that.timerId_) { 68 if (that.timerId_) {
76 window.clearTimeout(that.timerId_); 69 window.clearTimeout(that.timerId_);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 157 }
165 }; 158 };
166 159
167 /** @type {remoting.Toolbar} */ 160 /** @type {remoting.Toolbar} */
168 remoting.toolbar = null; 161 remoting.toolbar = null;
169 162
170 /** @private */ 163 /** @private */
171 remoting.Toolbar.STUB_EXTENDED_CLASS_ = 'toolbar-stub-extended'; 164 remoting.Toolbar.STUB_EXTENDED_CLASS_ = 'toolbar-stub-extended';
172 /** @private */ 165 /** @private */
173 remoting.Toolbar.VISIBLE_CLASS_ = 'toolbar-visible'; 166 remoting.Toolbar.VISIBLE_CLASS_ = 'toolbar-visible';
OLDNEW
« no previous file with comments | « remoting/webapp/remoting.js ('k') | remoting/webapp/unittests/menu_button_unittest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698