OLD | NEW |
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 /** @suppress {duplicate} */ | 5 /** @suppress {duplicate} */ |
6 var remoting = remoting || {}; | 6 var remoting = remoting || {}; |
7 | 7 |
8 (function() { | 8 (function() { |
9 | 9 |
10 'use strict'; | 10 'use strict'; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 | 68 |
69 /** @private */ | 69 /** @private */ |
70 remoting.HostNeedsUpdateDialog.prototype.onOK_ = function() { | 70 remoting.HostNeedsUpdateDialog.prototype.onOK_ = function() { |
71 this.deferred_.resolve(); | 71 this.deferred_.resolve(); |
72 this.cleanup_(); | 72 this.cleanup_(); |
73 }; | 73 }; |
74 | 74 |
75 /** @private */ | 75 /** @private */ |
76 remoting.HostNeedsUpdateDialog.prototype.onCancel_ = function() { | 76 remoting.HostNeedsUpdateDialog.prototype.onCancel_ = function() { |
77 this.deferred_.reject(remoting.Error.CANCELLED); | 77 this.deferred_.reject(new remoting.Error(remoting.Error.Tag.CANCELLED)); |
78 this.cleanup_(); | 78 this.cleanup_(); |
79 }; | 79 }; |
80 | 80 |
81 /** | 81 /** |
82 * @param {HTMLElement} rootElement | 82 * @param {HTMLElement} rootElement |
83 * @param {remoting.Host} host | 83 * @param {remoting.Host} host |
84 * @constructor | 84 * @constructor |
85 */ | 85 */ |
86 remoting.PinDialog = function(rootElement, host) { | 86 remoting.PinDialog = function(rootElement, host) { |
87 /** @private */ | 87 /** @private */ |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 }; | 156 }; |
157 | 157 |
158 /** @private */ | 158 /** @private */ |
159 remoting.PinDialog.prototype.onConnect_ = function() { | 159 remoting.PinDialog.prototype.onConnect_ = function() { |
160 this.deferred_.resolve(this.pinInput_.value); | 160 this.deferred_.resolve(this.pinInput_.value); |
161 remoting.setMode(remoting.AppMode.CLIENT_CONNECTING); | 161 remoting.setMode(remoting.AppMode.CLIENT_CONNECTING); |
162 }; | 162 }; |
163 | 163 |
164 /** @private */ | 164 /** @private */ |
165 remoting.PinDialog.prototype.onCancel_ = function() { | 165 remoting.PinDialog.prototype.onCancel_ = function() { |
166 this.deferred_.reject(remoting.Error.CANCELLED); | 166 this.deferred_.reject(new remoting.Error(remoting.Error.Tag.CANCELLED)); |
167 remoting.setMode(remoting.AppMode.HOME); | 167 remoting.setMode(remoting.AppMode.HOME); |
168 }; | 168 }; |
169 | 169 |
170 })(); | 170 })(); |
OLD | NEW |