OLD | NEW |
---|---|
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 /** @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 29 matching lines...) Expand all Loading... | |
40 remoting.HangoutConsentDialog.prototype.onConfirmResponse_ = function( | 40 remoting.HangoutConsentDialog.prototype.onConfirmResponse_ = function( |
41 confirm, responseToken) { | 41 confirm, responseToken) { |
42 if (responseToken !== this.requestToken_) { | 42 if (responseToken !== this.requestToken_) { |
43 return; | 43 return; |
44 } | 44 } |
45 | 45 |
46 if (confirm) { | 46 if (confirm) { |
47 this.onConsentResponseDeferred_.resolve(); | 47 this.onConsentResponseDeferred_.resolve(); |
48 } else { | 48 } else { |
49 this.onConsentResponseDeferred_.reject( | 49 this.onConsentResponseDeferred_.reject( |
50 new Error(remoting.Error.CANCELLED)); | 50 remoting.Error.CANCELLED); |
Jamie
2015/03/02 18:28:09
No new line.
John Williams
2015/03/02 22:01:37
Done.
| |
51 } | 51 } |
52 this.onConsentResponseDeferred_ = null; | 52 this.onConsentResponseDeferred_ = null; |
53 }; | 53 }; |
54 | 54 |
55 /** | 55 /** |
56 * @param {boolean} authorized If true, the consent dialog will hide the | 56 * @param {boolean} authorized If true, the consent dialog will hide the |
57 * authorization section. | 57 * authorization section. |
58 * @param {Bounds=} opt_parentBounds If present, the consent dialog will be | 58 * @param {Bounds=} opt_parentBounds If present, the consent dialog will be |
59 * centered within |opt_parentBounds|. | 59 * centered within |opt_parentBounds|. |
60 * @return {Promise} A Promise that will resolve when permission is granted or | 60 * @return {Promise} A Promise that will resolve when permission is granted or |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
96 | 96 |
97 /** @return {remoting.HangoutConsentDialog} */ | 97 /** @return {remoting.HangoutConsentDialog} */ |
98 remoting.HangoutConsentDialog.getInstance = function() { | 98 remoting.HangoutConsentDialog.getInstance = function() { |
99 if (!instance_) { | 99 if (!instance_) { |
100 instance_ = new remoting.HangoutConsentDialog(); | 100 instance_ = new remoting.HangoutConsentDialog(); |
101 } | 101 } |
102 return instance_; | 102 return instance_; |
103 }; | 103 }; |
104 | 104 |
105 }()); | 105 }()); |
OLD | NEW |