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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** @suppress {duplicate} */ | 7 /** @suppress {duplicate} */ |
8 var remoting = remoting || {}; | 8 var remoting = remoting || {}; |
9 | 9 |
10 /** @constructor */ | 10 /** @constructor */ |
(...skipping 20 matching lines...) Expand all Loading... |
31 this.infobox = ''; | 31 this.infobox = ''; |
32 | 32 |
33 /** @type {?function():void} */ | 33 /** @type {?function():void} */ |
34 this.onTimeout = function() {}; | 34 this.onTimeout = function() {}; |
35 | 35 |
36 /** @type {string} */ | 36 /** @type {string} */ |
37 this.htmlFile = ''; | 37 this.htmlFile = ''; |
38 | 38 |
39 /** @type {string} */ | 39 /** @type {string} */ |
40 this.frame = ''; | 40 this.frame = ''; |
| 41 |
| 42 /** @type {number} */ |
| 43 this.minimumWidth = 0; |
41 }; | 44 }; |
42 | 45 |
43 /** | 46 /** |
44 * Create a new message window. | 47 * Create a new message window. |
45 * | 48 * |
46 * @param {remoting.MessageWindowOptions} options Message window create options | 49 * @param {remoting.MessageWindowOptions} options Message window create options |
47 * @constructor | 50 * @constructor |
48 */ | 51 */ |
49 remoting.MessageWindow = function(options) { | 52 remoting.MessageWindow = function(options) { |
50 var title = options.title; | 53 var title = options.title; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 title: title, | 92 title: title, |
90 message: message, | 93 message: message, |
91 infobox: infobox, | 94 infobox: infobox, |
92 buttonLabel: okButtonLabel, | 95 buttonLabel: okButtonLabel, |
93 cancelButtonLabel: cancelButtonLabel, | 96 cancelButtonLabel: cancelButtonLabel, |
94 showSpinner: (duration != 0) | 97 showSpinner: (duration != 0) |
95 }; | 98 }; |
96 | 99 |
97 var windowAttributes = { | 100 var windowAttributes = { |
98 bounds: { | 101 bounds: { |
99 width: 400, | 102 width: options.minimumWidth || 400, |
100 height: 100 | 103 height: 100 |
101 }, | 104 }, |
102 resizable: false, | 105 resizable: false, |
103 frame: options.frame || 'chrome' | 106 frame: options.frame || 'chrome' |
104 }; | 107 }; |
105 | 108 |
106 /** @type {remoting.MessageWindow} */ | 109 /** @type {remoting.MessageWindow} */ |
107 var that = this; | 110 var that = this; |
108 | 111 |
109 /** @param {AppWindow} appWindow */ | 112 /** @param {AppWindow} appWindow */ |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 | 270 |
268 /** | 271 /** |
269 * Cancel the current connection and close all app windows. | 272 * Cancel the current connection and close all app windows. |
270 * | 273 * |
271 * @param {number} result The dialog result. | 274 * @param {number} result The dialog result. |
272 */ | 275 */ |
273 remoting.MessageWindow.quitApp = function(result) { | 276 remoting.MessageWindow.quitApp = function(result) { |
274 remoting.MessageWindowManager.closeAllMessageWindows(); | 277 remoting.MessageWindowManager.closeAllMessageWindows(); |
275 window.close(); | 278 window.close(); |
276 }; | 279 }; |
OLD | NEW |