| 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;
|
| + }
|
| +});
|
| +})();
|
|
|