Index: chrome/browser/profiles/profile_window.h |
diff --git a/chrome/browser/profiles/profile_window.h b/chrome/browser/profiles/profile_window.h |
index 033357c28a1c774b39b80612d0a05a0143967515..f86c1f5d98e7c58d3f5cbb31127dd906e733165d 100644 |
--- a/chrome/browser/profiles/profile_window.h |
+++ b/chrome/browser/profiles/profile_window.h |
@@ -6,6 +6,7 @@ |
#define CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ |
#include "base/callback_forward.h" |
+#include "chrome/browser/profiles/profile_manager.h" |
#include "chrome/browser/profiles/profile_metrics.h" |
#include "chrome/browser/ui/browser_window.h" |
#include "chrome/browser/ui/host_desktop.h" |
@@ -17,9 +18,6 @@ namespace base { class FilePath; } |
namespace profiles { |
-// Callback to be used when switching to a new profile is completed. |
-typedef base::Callback<void()> ProfileSwitchingDoneCallback; |
- |
// Different tutorials that can be displayed in the user manager. |
enum UserManagerTutorialMode { |
USER_MANAGER_NO_TUTORIAL, // Does not display a tutorial. |
@@ -27,6 +25,17 @@ enum UserManagerTutorialMode { |
USER_MANAGER_TUTORIAL_LOCK, // TODO(noms): To be implemented. |
}; |
+// Different actions to perform after the user manager selects a profile. |
+enum UserManagerProfileSelected { |
+ USER_MANAGER_SELECT_PROFILE_NO_ACTION, |
+ USER_MANAGER_SELECT_PROFILE_TASK_MANAGER, |
+ USER_MANAGER_SELECT_PROFILE_ABOUT_CHROME, |
+}; |
+ |
+extern const char kUserManagerDisplayTutorial[]; |
+extern const char kUserManagerSelectProfileTaskManager[]; |
+extern const char kUserManagerSelectProfileAboutChrome[]; |
+ |
// Activates a window for |profile| on the desktop specified by |
// |desktop_type|. If no such window yet exists, or if |always_create| is |
// true, this first creates a new window, then activates |
@@ -48,18 +57,18 @@ void FindOrCreateNewWindowForProfile( |
void SwitchToProfile(const base::FilePath& path, |
chrome::HostDesktopType desktop_type, |
bool always_create, |
- ProfileSwitchingDoneCallback callback, |
+ ProfileManager::CreateCallback callback, |
ProfileMetrics::ProfileOpen metric); |
// Opens a Browser for the guest profile and runs |callback| if it isn't null. |
void SwitchToGuestProfile(chrome::HostDesktopType desktop_type, |
- ProfileSwitchingDoneCallback callback); |
+ ProfileManager::CreateCallback callback); |
// Creates a new profile from the next available profile directory, and |
// opens a new browser window for the profile once it is ready. When the browser |
// is opened, |callback| will be run if it isn't null. |
void CreateAndSwitchToNewProfile(chrome::HostDesktopType desktop_type, |
- ProfileSwitchingDoneCallback callback, |
+ ProfileManager::CreateCallback callback, |
ProfileMetrics::ProfileAdd metric); |
// Closes all browser windows that belong to the guest profile. |
@@ -72,11 +81,13 @@ void LockProfile(Profile* profile); |
// the value of |tutorial_mode|, the user manager can show a specific |
// tutorial, or no tutorial at all. If a tutorial is not shown, then |
// |profile_path_to_focus| could be used to specify which user should be |
-// focused. |callback| is run with the custom url to be displayed, as well as |
-// a pointer to the guest profile. |
+// focused. After a profile is opened from the user manager, perform |
+// |profile_open_action|. |callback| is run with the custom url to be displayed, |
+// as well as a pointer to the guest profile. |
void CreateGuestProfileForUserManager( |
const base::FilePath& profile_path_to_focus, |
profiles::UserManagerTutorialMode tutorial_mode, |
+ profiles::UserManagerProfileSelected profile_open_action, |
const base::Callback<void(Profile*, const std::string&)>& callback); |
// Based on the |profile| preferences, determines whether a user manager |