| 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..2dbf8d1b9369a99c6522c1caf146f4165907abc2 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_IMPLICIT_CONSTRUCTORS(UserManager);
|
| +};
|
| +
|
| +// Dialog that will be displayed when a profile is selected in UserManager.
|
| +class UserManagerProfileDialog {
|
| + 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;
|
| @@ -98,17 +109,14 @@ class UserManager {
|
| void LoadingStateChanged(content::WebContents* source,
|
| bool to_different_document) override;
|
|
|
| - private:
|
| - virtual void CloseReauthDialog() = 0;
|
| + protected:
|
| + virtual void CloseDialog() = 0;
|
|
|
| // 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_
|
|
|