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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 /** @type {ClientRect} */(this.borderElement_.getBoundingClientRect()); | 56 /** @type {ClientRect} */(this.borderElement_.getBoundingClientRect()); |
57 rects.push({left: rect.left, | 57 rects.push({left: rect.left, |
58 top: rect.top, | 58 top: rect.top, |
59 width: rect.width, | 59 width: rect.width, |
60 height: rect.height}); | 60 height: rect.height}); |
61 }; | 61 }; |
62 | 62 |
63 /** @private */ | 63 /** @private */ |
64 remoting.AuthDialog.prototype.onClick_ = function() { | 64 remoting.AuthDialog.prototype.onClick_ = function() { |
65 this.rootElement_.hidden = true; | 65 this.rootElement_.hidden = true; |
66 this.onAuthButtonDeferred_.resolve(); | 66 this.onAuthButtonDeferred_.resolve(null); |
67 this.onAuthButtonDeferred_ = null; | 67 this.onAuthButtonDeferred_ = null; |
68 remoting.windowShape.updateClientWindowShape(); | 68 remoting.windowShape.updateClientWindowShape(); |
69 }; | 69 }; |
70 | 70 |
71 /** | 71 /** |
72 * @return {Promise} A Promise object that resolves when the user clicks on the | 72 * @return {Promise} A Promise object that resolves when the user clicks on the |
73 * auth button. | 73 * auth button. |
74 */ | 74 */ |
75 remoting.AuthDialog.prototype.show = function() { | 75 remoting.AuthDialog.prototype.show = function() { |
76 if (this.isVisible()) { | 76 if (this.isVisible()) { |
(...skipping 18 matching lines...) Expand all Loading... |
95 */ | 95 */ |
96 remoting.AuthDialog.getInstance = function() { | 96 remoting.AuthDialog.getInstance = function() { |
97 if (!instance_) { | 97 if (!instance_) { |
98 var rootElement = document.getElementById('auth-dialog'); | 98 var rootElement = document.getElementById('auth-dialog'); |
99 instance_ = new remoting.AuthDialog(rootElement); | 99 instance_ = new remoting.AuthDialog(rootElement); |
100 } | 100 } |
101 return instance_; | 101 return instance_; |
102 }; | 102 }; |
103 | 103 |
104 })(); | 104 })(); |
OLD | NEW |