Chromium Code Reviews| Index: chrome/browser/resources/md_user_manager/user_manager.js |
| diff --git a/chrome/browser/resources/md_user_manager/user_manager.js b/chrome/browser/resources/md_user_manager/user_manager.js |
| index 6864f2c15aee827e7fb3d549e0cf1d4bd0b9f64e..24e329aedb5316dda10467e342773947191324b1 100644 |
| --- a/chrome/browser/resources/md_user_manager/user_manager.js |
| +++ b/chrome/browser/resources/md_user_manager/user_manager.js |
| @@ -66,6 +66,7 @@ cr.define('cr.ui', function() { |
| signin.ProfileBrowserProxyImpl.getInstance().initializeUserManager( |
| window.location.hash); |
| + cr.addWebUIListener('show-error-dialog', cr.ui.UserManager.showErrorDialog); |
|
dpapad
2016/05/31 19:11:59
Should this listener be removed at some point? Is
Moe
2016/05/31 20:53:05
user_manager.js is executed in the top level html
dpapad
2016/05/31 21:05:51
If it is guaranteed that initialized() is called o
|
| }; |
| /** |
| @@ -132,6 +133,14 @@ cr.define('cr.ui', function() { |
| DisplayManager.clearErrors(); |
| }; |
| + /** |
| + * Shows the error dialog populated with the given message. |
| + * @param {string} message Error message to show. |
| + */ |
| + UserManager.showErrorDialog = function(message) { |
| + document.querySelector('error-dialog').show(message); |
| + }; |
| + |
| // Export |
| return { |
| UserManager: UserManager |