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

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

Issue 955283002: Converted remoting.Error from an enum to a class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 handling user-facing aspects of the client session. 7 * Class handling user-facing aspects of the client session.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 13 matching lines...) Expand all
24 */ 24 */
25 remoting.enableMouseLock = false; 25 remoting.enableMouseLock = false;
26 26
27 /** 27 /**
28 * @param {remoting.ClientSession} session 28 * @param {remoting.ClientSession} session
29 * @param {HTMLElement} container 29 * @param {HTMLElement} container
30 * @param {remoting.Host} host 30 * @param {remoting.Host} host
31 * @param {remoting.DesktopConnectedView.Mode} mode The mode of this connection. 31 * @param {remoting.DesktopConnectedView.Mode} mode The mode of this connection.
32 * @param {string} defaultRemapKeys The default set of remap keys, to use 32 * @param {string} defaultRemapKeys The default set of remap keys, to use
33 * when the client doesn't define any. 33 * when the client doesn't define any.
34 * @param {function(remoting.Error, remoting.ClientPlugin): void} onInitialized 34 * @param {function(!remoting.Error, remoting.ClientPlugin): void} onInitialized
35 * @constructor 35 * @constructor
36 * @extends {base.EventSourceImpl} 36 * @extends {base.EventSourceImpl}
37 */ 37 */
38 remoting.DesktopConnectedView = function(session, container, host, mode, 38 remoting.DesktopConnectedView = function(session, container, host, mode,
39 defaultRemapKeys, onInitialized) { 39 defaultRemapKeys, onInitialized) {
40 this.session_ = session; 40 this.session_ = session;
41 41
42 /** @private {HTMLElement} */ 42 /** @private {HTMLElement} */
43 this.container_ = container; 43 this.container_ = container;
44 44
45 /** @private {remoting.ClientPlugin} */ 45 /** @private {remoting.ClientPlugin} */
46 this.plugin_ = null; 46 this.plugin_ = null;
47 47
48 /** @private */ 48 /** @private */
49 this.host_ = host; 49 this.host_ = host;
50 50
51 /** @private */ 51 /** @private */
52 this.mode_ = mode; 52 this.mode_ = mode;
53 53
54 /** @private {string} */ 54 /** @private {string} */
55 this.defaultRemapKeys_ = defaultRemapKeys; 55 this.defaultRemapKeys_ = defaultRemapKeys;
56 56
57 /** 57 /**
58 * Called when the UI is finished initializing. 58 * Called when the UI is finished initializing.
59 * @type {function(remoting.Error, remoting.ClientPlugin):void} 59 * @type {function(!remoting.Error, remoting.ClientPlugin):void}
60 */ 60 */
61 this.onInitialized_ = onInitialized; 61 this.onInitialized_ = onInitialized;
62 62
63 /** @private */ 63 /** @private */
64 this.callPluginLostFocus_ = this.pluginLostFocus_.bind(this); 64 this.callPluginLostFocus_ = this.pluginLostFocus_.bind(this);
65 /** @private */ 65 /** @private */
66 this.callPluginGotFocus_ = this.pluginGotFocus_.bind(this); 66 this.callPluginGotFocus_ = this.pluginGotFocus_.bind(this);
67 /** @private {Element} */ 67 /** @private {Element} */
68 this.debugRegionContainer_ = 68 this.debugRegionContainer_ =
69 this.container_.querySelector('.debug-region-container'); 69 this.container_.querySelector('.debug-region-container');
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 var rect = document.createElement('div'); 597 var rect = document.createElement('div');
598 rect.classList.add('debug-region-rect'); 598 rect.classList.add('debug-region-rect');
599 rect.style.left = rects[i][0] + 'px'; 599 rect.style.left = rects[i][0] + 'px';
600 rect.style.top = rects[i][1] +'px'; 600 rect.style.top = rects[i][1] +'px';
601 rect.style.width = rects[i][2] +'px'; 601 rect.style.width = rects[i][2] +'px';
602 rect.style.height = rects[i][3] + 'px'; 602 rect.style.height = rects[i][3] + 'px';
603 this.debugRegionContainer_.appendChild(rect); 603 this.debugRegionContainer_.appendChild(rect);
604 } 604 }
605 } 605 }
606 }; 606 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698