Chromium Code Reviews| Index: chrome/browser/ui/user_manager.h |
| diff --git a/chrome/browser/ui/user_manager.h b/chrome/browser/ui/user_manager.h |
| index 1173d049bb0db70ce6c5997a8876aff3f5487749..46a9a9de9b1d8232e71633b46f5e3c0b2d1455fc 100644 |
| --- a/chrome/browser/ui/user_manager.h |
| +++ b/chrome/browser/ui/user_manager.h |
| @@ -23,16 +23,6 @@ class UserManager { |
| static constexpr int kWindowWidth = 800; |
| static constexpr int kWindowHeight = 600; |
| - // Dimensions of the reauth dialog displaying the old-style signin flow with |
| - // the username and password challenge on the same form. |
| - static constexpr int kPasswordCombinedReauthDialogHeight = 440; |
| - static constexpr int kPasswordCombinedReauthDialogWidth = 360; |
| - |
| - // Dimensions of the reauth dialog displaying the password-separated signin |
| - // flow. |
| - static constexpr int kReauthDialogHeight = 512; |
| - static constexpr int kReauthDialogWidth = 448; |
| - |
| // Shows the User Manager or re-activates an existing one, focusing the |
| // profile given by |profile_path_to_focus|; passing an empty base::FilePath |
| // focuses no user pod. Based on the value of |tutorial_mode|, a tutorial |
| @@ -58,6 +48,26 @@ class UserManager { |
| static void AddOnUserManagerShownCallbackForTesting( |
| const base::Closure& callback); |
| + // Get the path of profile that is being signed in. |
| + static base::FilePath GetSigninProfilePath(); |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(UserManager); |
|
sky
2016/12/08 23:39:59
Are subclasses of these classes actually created?
zmin
2016/12/09 00:16:28
Done.
|
| +}; |
| + |
| +// Dialog that will be displayed when a profile is selected in UserManager. |
| +class UserManagerDialog { |
|
sky
2016/12/08 23:39:59
How about a more specific name, UserManagerProfile
zmin
2016/12/09 00:16:28
Done. Also changed the delegate's name to UserMana
|
| + public: |
| + // Dimensions of the reauth dialog displaying the old-style signin flow with |
| + // the username and password challenge on the same form. |
| + static constexpr int kPasswordCombinedDialogHeight = 440; |
| + static constexpr int kPasswordCombinedDialogWidth = 360; |
| + |
| + // Dimensions of the reauth dialog displaying the password-separated signin |
| + // flow. |
| + static constexpr int kDialogHeight = 512; |
| + static constexpr int kDialogWidth = 448; |
| + |
| // Shows a dialog where the user can re-authenticate the profile with the |
| // given |email|. This is called in the following scenarios: |
| // -From the user manager when a profile is locked and the user's password is |
| @@ -70,26 +80,27 @@ class UserManager { |
| const std::string& email, |
| signin_metrics::Reason reason); |
| - // Hides the reauth dialog if it is showing. |
| - static void HideReauthDialog(); |
| - |
| // Shows a dialog where the user logs into their profile for the first time |
| // via the user manager. |
| static void ShowSigninDialog(content::BrowserContext* browser_context, |
| const base::FilePath& profile_path); |
| + // Show the dialog and display local sign in error message without browser. |
| + static void ShowDialogAndDisplayErrorMessage( |
| + content::BrowserContext* browser_context); |
| + |
| // Display local sign in error message without browser. |
| static void DisplayErrorMessage(); |
| - // Get the path of profile that is being signed in. |
| - static base::FilePath GetSigninProfilePath(); |
| + // Hides the dialog if it is showing. |
| + static void HideDialog(); |
| // Abstract base class for performing online reauthentication of profiles in |
| // the User Manager. It is concretely implemented in UserManagerMac and |
| // UserManagerView to specialize the closing of the UI's dialog widgets. |
| - class BaseReauthDialogDelegate : public content::WebContentsDelegate { |
| + class BaseDialogDelegate : public content::WebContentsDelegate { |
| public: |
| - BaseReauthDialogDelegate(); |
| + BaseDialogDelegate(); |
| // content::WebContentsDelegate: |
| bool HandleContextMenu(const content::ContextMenuParams& params) override; |
| @@ -99,16 +110,13 @@ class UserManager { |
| bool to_different_document) override; |
| private: |
| - virtual void CloseReauthDialog() = 0; |
| + virtual void CloseDialog() = 0; |
|
sky
2016/12/08 23:39:59
Shouldn't the virtual function be protected? It's
zmin
2016/12/09 00:16:28
I just copy+paste but I agree private is weird her
|
| // WebContents of the embedded WebView. |
| content::WebContents* guest_web_contents_; |
| - DISALLOW_COPY_AND_ASSIGN(BaseReauthDialogDelegate); |
| + DISALLOW_COPY_AND_ASSIGN(BaseDialogDelegate); |
| }; |
| - |
| - private: |
| - DISALLOW_COPY_AND_ASSIGN(UserManager); |
| }; |
| #endif // CHROME_BROWSER_UI_USER_MANAGER_H_ |