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

Unified Diff: chrome/browser/resources/md_user_manager/error_dialog.js

Issue 2025433002: MD User Manager: Display error message when all profiles are locked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comment Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_user_manager/error_dialog.js
diff --git a/chrome/browser/resources/md_user_manager/error_dialog.js b/chrome/browser/resources/md_user_manager/error_dialog.js
new file mode 100644
index 0000000000000000000000000000000000000000..47b2eb204243804086ac4a3af71ba119b94f5215
--- /dev/null
+++ b/chrome/browser/resources/md_user_manager/error_dialog.js
@@ -0,0 +1,54 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @fileoverview 'error-dialog' is a popup dialog that displays error messages
+ * in the user manager.
+ */
+(function() {
+Polymer({
+ is: 'error-dialog',
+
+ properties: {
+ /**
+ * True if the element is currently hidden.
+ * @private {boolean}
+ */
+ popupHidden_: {
+ type: Boolean,
+ value: true
+ },
+
+ /**
+ * The message shown in the dialog.
+ * @private {string}
+ */
+ message_: {
+ type: String,
+ value: ''
+ }
+ },
+
+ /**
+ * Displays the popup populated with the given message.
+ * @param {string} message Error message to show.
+ */
+ show: function(message) {
+ this.message_ = message;
+ this.popupHidden_ = false;
+
+ this.async(function() {
+ this.$$('paper-icon-button').focus();
+ }.bind(this));
+ },
+
+ /**
+ * Hides the popup.
+ * @private
+ */
+ onCloseTap_: function() {
+ this.popupHidden_ = true;
+ }
+});
+})();

Powered by Google App Engine
This is Rietveld 408576698