Chromium Code Reviews| Index: chrome/browser/ui/webui/signin/signin_error_handler.h |
| diff --git a/chrome/browser/ui/webui/signin/signin_error_handler.h b/chrome/browser/ui/webui/signin/signin_error_handler.h |
| index 3de30be7ce9488441f4df941514f1385e73c186f..0932d3755080d71edcd4a7701e4bbcba9a1101fb 100644 |
| --- a/chrome/browser/ui/webui/signin/signin_error_handler.h |
| +++ b/chrome/browser/ui/webui/signin/signin_error_handler.h |
| @@ -19,7 +19,10 @@ class ListValue; |
| class SigninErrorHandler : public content::WebUIMessageHandler { |
| public: |
| - SigninErrorHandler() {} |
| + // Create a handler depends on whether the error ui is displayed in browser |
| + // window or user manager. |
| + static SigninErrorHandler* Create(bool is_system_profile); |
| + |
| ~SigninErrorHandler() override {} |
| // content::WebUIMessageHandler: |
| @@ -33,6 +36,8 @@ class SigninErrorHandler : public content::WebUIMessageHandler { |
| } |
| protected: |
| + SigninErrorHandler() {} |
| + |
| // Handles "switch" message from the page. No arguments. |
| // This message is sent when the user switches to the existing profile of the |
| // same username used for signin. |
| @@ -53,7 +58,7 @@ class SigninErrorHandler : public content::WebUIMessageHandler { |
| // a single integer value for the height the native view should resize to. |
| virtual void HandleInitializedWithSize(const base::ListValue* args); |
| - void CloseDialog(); |
| + virtual void CloseDialog(); |
| private: |
| const ProfileAttributesEntry* duplicate_profile_entry_ = nullptr; |
| @@ -61,4 +66,17 @@ class SigninErrorHandler : public content::WebUIMessageHandler { |
| DISALLOW_COPY_AND_ASSIGN(SigninErrorHandler); |
| }; |
| +// A Web UI message handler for signin error ui that is displayed without |
| +// browser window. |
| +class SigninErrorWithoutBrowserHandler : public SigninErrorHandler { |
| + public: |
| + SigninErrorWithoutBrowserHandler(); |
| + |
| + protected: |
| + void CloseDialog() override; |
|
tommycli
2016/09/21 18:26:59
nit: Such a small difference does not seem worth m
zmin
2016/09/21 21:21:37
I think you're right. There is only one conditiona
|
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(SigninErrorWithoutBrowserHandler); |
| +}; |
| + |
| #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_SIGNIN_ERROR_HANDLER_H_ |