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

Unified Diff: ui/webui/resources/js/cr/ui/dialogs.js

Issue 575313004: Compiling file_manager, part 2: remove all warnings not caused by Object.freeze()-like enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@I_file_manager
Patch Set: Created 6 years, 3 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
Index: ui/webui/resources/js/cr/ui/dialogs.js
diff --git a/ui/webui/resources/js/cr/ui/dialogs.js b/ui/webui/resources/js/cr/ui/dialogs.js
index 3a3456fbca72052bb8ca5d695e41513a949c4cb3..b96b905adde4f85c60341ee5ac5de8342fdfb3c1 100644
--- a/ui/webui/resources/js/cr/ui/dialogs.js
+++ b/ui/webui/resources/js/cr/ui/dialogs.js
@@ -3,7 +3,9 @@
// found in the LICENSE file.
cr.define('cr.ui.dialogs', function() {
-
+ /**
+ * @constructor
+ */
function BaseDialog(parentNode) {
this.parentNode_ = parentNode;
this.document_ = parentNode.ownerDocument;
@@ -205,7 +207,10 @@ cr.define('cr.ui.dialogs', function() {
}, 0);
};
- BaseDialog.prototype.hide = function(onHide) {
+ /**
+ * @param {Function=} opt_onHide
+ */
+ BaseDialog.prototype.hide = function(opt_onHide) {
// Restore focusability.
for (var i = 0; i < this.deactivatedNodes_.length; i++) {
var node = this.deactivatedNodes_[i];
@@ -232,13 +237,15 @@ cr.define('cr.ui.dialogs', function() {
setTimeout(function() {
// Wait until the transition is done before removing the dialog.
self.parentNode_.removeChild(self.container_);
- if (onHide)
- onHide();
+ if (opt_onHide)
+ opt_onHide();
}, BaseDialog.ANIMATE_STABLE_DURATION);
};
/**
* AlertDialog contains just a message and an ok button.
+ * @constructor
+ * @extends {cr.ui.dialogs.BaseDialog}
*/
function AlertDialog(parentNode) {
BaseDialog.apply(this, [parentNode]);
@@ -253,6 +260,8 @@ cr.define('cr.ui.dialogs', function() {
/**
* ConfirmDialog contains a message, an ok button, and a cancel button.
+ * @constructor
+ * @extends {cr.ui.dialogs.BaseDialog}
*/
function ConfirmDialog(parentNode) {
BaseDialog.apply(this, [parentNode]);
@@ -263,6 +272,8 @@ cr.define('cr.ui.dialogs', function() {
/**
* PromptDialog contains a message, a text input, an ok button, and a
* cancel button.
+ * @constructor
+ * @extends {cr.ui.dialogs.BaseDialog}
*/
function PromptDialog(parentNode) {
BaseDialog.apply(this, [parentNode]);

Powered by Google App Engine
This is Rietveld 408576698