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

Side by Side Diff: remoting/webapp/base/js/message_window_helper.js

Issue 1133103004: Allow MessageWindow callers to specify a minimum width. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « remoting/webapp/app_remoting/js/loading_window.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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 };
OLDNEW
« no previous file with comments | « remoting/webapp/app_remoting/js/loading_window.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698