| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_USER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_UI_USER_MANAGER_H_ |
| 6 #define CHROME_BROWSER_UI_USER_MANAGER_H_ | 6 #define CHROME_BROWSER_UI_USER_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "chrome/browser/profiles/profile_window.h" | 10 #include "chrome/browser/profiles/profile_window.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 signin_metrics::Reason reason); | 52 signin_metrics::Reason reason); |
| 53 | 53 |
| 54 // Hides the reauth dialog if it is showing. | 54 // Hides the reauth dialog if it is showing. |
| 55 static void HideReauthDialog(); | 55 static void HideReauthDialog(); |
| 56 | 56 |
| 57 // TODO(noms): Figure out if this size can be computed dynamically or adjusted | 57 // TODO(noms): Figure out if this size can be computed dynamically or adjusted |
| 58 // for smaller screens. | 58 // for smaller screens. |
| 59 static const int kWindowWidth = 800; | 59 static const int kWindowWidth = 800; |
| 60 static const int kWindowHeight = 600; | 60 static const int kWindowHeight = 600; |
| 61 | 61 |
| 62 static const int kReauthDialogWidth = 360; | 62 // Dimensions of the reauth dialog displaying the old-style signin flow with |
| 63 static const int kReauthDialogHeight = 440; | 63 // the username and password challenge on the same form. |
| 64 static const int kPasswordCombinedReauthDialogHeight = 440; |
| 65 static const int kPasswordCombinedReauthDialogWidth = 360; |
| 66 |
| 67 // Dimensions of the reauth dialog displaying the password-separated signin |
| 68 // flow. |
| 69 static const int kReauthDialogHeight = 512; |
| 70 static const int kReauthDialogWidth = 448; |
| 64 | 71 |
| 65 // This class observes the WebUI used in the UserManager to perform online | 72 // This class observes the WebUI used in the UserManager to perform online |
| 66 // reauthentication of locked profiles. It is concretely implemented in | 73 // reauthentication of locked profiles. It is concretely implemented in |
| 67 // UserManagerMac and UserManagerView to specialize the closing of the UI's | 74 // UserManagerMac and UserManagerView to specialize the closing of the UI's |
| 68 // dialog widget. | 75 // dialog widget. |
| 69 class ReauthDialogObserver : public content::WebContentsObserver { | 76 class ReauthDialogObserver : public content::WebContentsObserver { |
| 70 public: | 77 public: |
| 71 ReauthDialogObserver(content::WebContents* web_contents, | 78 ReauthDialogObserver(content::WebContents* web_contents, |
| 72 const std::string& email_address); | 79 const std::string& email_address); |
| 73 | 80 |
| 74 private: | 81 private: |
| 75 // content::WebContentsObserver: | 82 // content::WebContentsObserver: |
| 76 void DidStopLoading() override; | 83 void DidStopLoading() override; |
| 77 | 84 |
| 78 virtual void CloseReauthDialog() = 0; | 85 virtual void CloseReauthDialog() = 0; |
| 79 | 86 |
| 80 const std::string email_address_; | 87 const std::string email_address_; |
| 81 | 88 |
| 82 DISALLOW_COPY_AND_ASSIGN(ReauthDialogObserver); | 89 DISALLOW_COPY_AND_ASSIGN(ReauthDialogObserver); |
| 83 }; | 90 }; |
| 84 | 91 |
| 85 private: | 92 private: |
| 86 DISALLOW_COPY_AND_ASSIGN(UserManager); | 93 DISALLOW_COPY_AND_ASSIGN(UserManager); |
| 87 }; | 94 }; |
| 88 | 95 |
| 89 #endif // CHROME_BROWSER_UI_USER_MANAGER_H_ | 96 #endif // CHROME_BROWSER_UI_USER_MANAGER_H_ |
| OLD | NEW |