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

Unified Diff: remoting/webapp/base/js/message_window_helper.js

Issue 1081813007: Make loading dialog prettier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer feedback. Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/base/js/message_window.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a4d564d68e0e1a9dbbe871864ca27be030e4ee0b..90267add4dc60a0b1e5e9df92a0d91d11d8361eb 100644
--- a/remoting/webapp/base/js/message_window_helper.js
+++ b/remoting/webapp/base/js/message_window_helper.js
@@ -32,6 +32,12 @@ remoting.MessageWindowOptions = function() {
/** @type {?function():void} */
this.onTimeout = function() {};
+
+ /** @type {string} */
+ this.htmlFile = '';
+
+ /** @type {string} */
+ this.frame = '';
};
/**
@@ -93,7 +99,8 @@ remoting.MessageWindow = function(options) {
width: 400,
height: 100
},
- resizable: false
+ resizable: false,
+ frame: options.frame || 'chrome'
};
/** @type {remoting.MessageWindow} */
@@ -108,7 +115,8 @@ remoting.MessageWindow = function(options) {
appWindow.contentWindow.addEventListener('load', onLoad, false);
};
- chrome.app.window.create('message_window.html', windowAttributes, onCreate);
+ var htmlFile = options.htmlFile || 'message_window.html';
+ chrome.app.window.create(htmlFile, windowAttributes, onCreate);
if (duration != 0) {
this.timer_ = window.setTimeout(this.onTimeoutHandler_.bind(this),
@@ -258,34 +266,6 @@ remoting.MessageWindow.showErrorMessage = function(title, message) {
};
/**
- * Static method to create and show a timed message box.
- *
- * @param {string} title The title of the message box.
- * @param {string} message The message.
- * @param {string} infobox Additional information to be displayed in an infobox,
- * or the empty string if there is no additional information.
- * @param {string} buttonLabel The text for the primary button.
- * @param {function(number):void} onResult The callback to invoke when the
- * user closes the message window.
- * @param {number} duration Time for wait before calling onTime
- * @param {?function():void} onTimeout Callback function.
- * @return {remoting.MessageWindow}
- */
-remoting.MessageWindow.showTimedMessageWindow = function(
- title, message, infobox, buttonLabel, onResult, duration, onTimeout) {
- var options = /** @type {remoting.MessageWindowOptions} */ ({
- title: title,
- message: message,
- infobox: infobox,
- buttonLabel: buttonLabel,
- onResult: onResult,
- duration: duration,
- onTimeout: onTimeout
- });
- return new remoting.MessageWindow(options);
-};
-
-/**
* Cancel the current connection and close all app windows.
*
* @param {number} result The dialog result.
« no previous file with comments | « remoting/webapp/base/js/message_window.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698