| Index: remoting/webapp/base/js/message_window_helper.js
|
| diff --git a/remoting/webapp/base/js/message_window_helper.js b/remoting/webapp/base/js/message_window_helper.js
|
| index f6657577c4982894d44f22afa5bd43c2f5e1ea22..ffcdc23a16ef9989e8e597cc46537bac32f53946 100644
|
| --- a/remoting/webapp/base/js/message_window_helper.js
|
| +++ b/remoting/webapp/base/js/message_window_helper.js
|
| @@ -41,6 +41,9 @@ remoting.MessageWindowOptions = function() {
|
|
|
| /** @type {number} */
|
| this.minimumWidth = 0;
|
| +
|
| + /** @type {boolean} */
|
| + this.showSpinner = false;
|
| };
|
|
|
| /**
|
| @@ -151,13 +154,37 @@ remoting.MessageWindow.prototype.updateMessage = function(message) {
|
| }
|
|
|
| var message_struct = {
|
| - command: 'update_message',
|
| + command: 'update',
|
| message: message
|
| };
|
| this.window_.postMessage(message_struct, '*');
|
| };
|
|
|
| /**
|
| + * Update the message being shown in the window to the given error message.
|
| + * In addition to updating the message, any spinner is disabled and the
|
| + * button text is changed to 'OK'.
|
| + * This should only be called after the window has been shown.
|
| + *
|
| + * @param {string} message The message.
|
| + */
|
| +remoting.MessageWindow.prototype.updateErrorMessage = function(message) {
|
| + if (!this.window_) {
|
| + this.pendingWindowOperations_.push(this.updateMessage.bind(this, message));
|
| + return;
|
| + }
|
| +
|
| + var message_struct = {
|
| + command: 'update',
|
| + message: message,
|
| + buttonLabel: chrome.i18n.getMessage(/*i18n-content*/'OK'),
|
| + cancelButtonLabel: '',
|
| + showSpinner: false
|
| + };
|
| + this.window_.postMessage(message_struct, '*');
|
| +};
|
| +
|
| +/**
|
| * Close the message box and unregister it with the window manager.
|
| */
|
| remoting.MessageWindow.prototype.close = function() {
|
|
|