| 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" |
| 11 #include "components/signin/core/browser/signin_metrics.h" | 11 #include "components/signin/core/browser/signin_metrics.h" |
| 12 #include "content/public/browser/web_contents_delegate.h" | 12 #include "content/public/browser/web_contents_delegate.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 class FilePath; | 15 class FilePath; |
| 16 } | 16 } |
| 17 | 17 |
| 18 // Cross-platform methods for displaying the user manager. | 18 // Cross-platform methods for displaying the user manager. |
| 19 class UserManager { | 19 class UserManager { |
| 20 public: | 20 public: |
| 21 // TODO(noms): Figure out if this size can be computed dynamically or adjusted | 21 // TODO(noms): Figure out if this size can be computed dynamically or adjusted |
| 22 // for smaller screens. | 22 // for smaller screens. |
| 23 static constexpr int kWindowWidth = 800; | 23 static constexpr int kWindowWidth = 800; |
| 24 static constexpr int kWindowHeight = 600; | 24 static constexpr int kWindowHeight = 600; |
| 25 | 25 |
| 26 // Shows the User Manager or re-activates an existing one, focusing the | 26 // Shows the User Manager or re-activates an existing one, focusing the |
| 27 // profile given by |profile_path_to_focus|; passing an empty base::FilePath | 27 // profile given by |profile_path_to_focus|; passing an empty base::FilePath |
| 28 // focuses no user pod. Based on the value of |tutorial_mode|, a tutorial | 28 // focuses no user pod. Depending on the value of |user_manager_action|, |
| 29 // could be shown, in which case |profile_path_to_focus| is ignored. Depending | 29 // executes an action once the user manager displays or after a profile is |
| 30 // on the value of |user_manager_action|, executes an action once the user | 30 // opened. |
| 31 // manager displays or after a profile is opened. | |
| 32 static void Show(const base::FilePath& profile_path_to_focus, | 31 static void Show(const base::FilePath& profile_path_to_focus, |
| 33 profiles::UserManagerTutorialMode tutorial_mode, | |
| 34 profiles::UserManagerAction user_manager_action); | 32 profiles::UserManagerAction user_manager_action); |
| 35 | 33 |
| 36 // Hides the User Manager. | 34 // Hides the User Manager. |
| 37 static void Hide(); | 35 static void Hide(); |
| 38 | 36 |
| 39 // Returns whether the User Manager is showing and active. | 37 // Returns whether the User Manager is showing and active. |
| 40 // TODO(zmin): Rename the function to something less confusing. | 38 // TODO(zmin): Rename the function to something less confusing. |
| 41 // https://crbug.com/649380. | 39 // https://crbug.com/649380. |
| 42 static bool IsShowing(); | 40 static bool IsShowing(); |
| 43 | 41 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 virtual void CloseDialog() = 0; | 106 virtual void CloseDialog() = 0; |
| 109 | 107 |
| 110 // WebContents of the embedded WebView. | 108 // WebContents of the embedded WebView. |
| 111 content::WebContents* guest_web_contents_; | 109 content::WebContents* guest_web_contents_; |
| 112 | 110 |
| 113 DISALLOW_COPY_AND_ASSIGN(BaseDialogDelegate); | 111 DISALLOW_COPY_AND_ASSIGN(BaseDialogDelegate); |
| 114 }; | 112 }; |
| 115 }; | 113 }; |
| 116 | 114 |
| 117 #endif // CHROME_BROWSER_UI_USER_MANAGER_H_ | 115 #endif // CHROME_BROWSER_UI_USER_MANAGER_H_ |
| OLD | NEW |