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

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

Issue 1016373003: [Chromoting] Change Application.Delegate to proper subclass of Application. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync/merge Created 5 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
« no previous file with comments | « remoting/webapp/crd/js/desktop_remoting.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 * Apps v2 custom title bar implementation 7 * Apps v2 custom title bar implementation
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 base.debug.assert(this.optionsMenuList_ != null); 46 base.debug.assert(this.optionsMenuList_ != null);
47 47
48 /** 48 /**
49 * @type {Array<{cls:string, fn: function()}>} 49 * @type {Array<{cls:string, fn: function()}>}
50 */ 50 */
51 var handlers = [ 51 var handlers = [
52 { cls: 'window-disconnect', fn: this.disconnectSession_.bind(this) }, 52 { cls: 'window-disconnect', fn: this.disconnectSession_.bind(this) },
53 { cls: 'window-maximize-restore', 53 { cls: 'window-maximize-restore',
54 fn: this.maximizeOrRestoreWindow_.bind(this) }, 54 fn: this.maximizeOrRestoreWindow_.bind(this) },
55 { cls: 'window-minimize', fn: this.minimizeWindow_.bind(this) }, 55 { cls: 'window-minimize', fn: this.minimizeWindow_.bind(this) },
56 { cls: 'window-close', fn: remoting.app.exit.bind(remoting.app) }, 56 { cls: 'window-close', fn: remoting.app.quit.bind(remoting.app) },
57 { cls: 'window-controls-stub', fn: this.toggleWindowControls_.bind(this) } 57 { cls: 'window-controls-stub', fn: this.toggleWindowControls_.bind(this) }
58 ]; 58 ];
59 for (var i = 0; i < handlers.length; ++i) { 59 for (var i = 0; i < handlers.length; ++i) {
60 var element = titleBar.querySelector('.' + handlers[i].cls); 60 var element = titleBar.querySelector('.' + handlers[i].cls);
61 base.debug.assert(element != null); 61 base.debug.assert(element != null);
62 element.addEventListener('click', handlers[i].fn, false); 62 element.addEventListener('click', handlers[i].fn, false);
63 } 63 }
64 64
65 // Ensure that tool-tips are always correct. 65 // Ensure that tool-tips are always correct.
66 this.handleWindowStateChange_(); 66 this.handleWindowStateChange_();
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 var hidePreview = function() { 226 var hidePreview = function() {
227 target.classList.remove('preview'); 227 target.classList.remove('preview');
228 }; 228 };
229 target.classList.add('preview'); 229 target.classList.add('preview');
230 window.setTimeout(hidePreview, kPreviewTimeoutMs); 230 window.setTimeout(hidePreview, kPreviewTimeoutMs);
231 }; 231 };
232 232
233 233
234 /** @type {remoting.WindowFrame} */ 234 /** @type {remoting.WindowFrame} */
235 remoting.windowFrame = null; 235 remoting.windowFrame = null;
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/desktop_remoting.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698