OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_PROFILES_PROFILE_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ |
6 #define CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "chrome/browser/profiles/profile_metrics.h" | 9 #include "chrome/browser/profiles/profile_metrics.h" |
10 #include "chrome/browser/ui/host_desktop.h" | 10 #include "chrome/browser/ui/host_desktop.h" |
11 #include "chrome/browser/ui/startup/startup_types.h" | 11 #include "chrome/browser/ui/startup/startup_types.h" |
12 | 12 |
13 class Profile; | 13 class Profile; |
14 namespace base { class FilePath; } | 14 namespace base { class FilePath; } |
15 | 15 |
16 namespace profiles { | 16 namespace profiles { |
17 | 17 |
18 // Callback to be used when switching to a new profile is completed. | 18 // Callback to be used when switching to a new profile is completed. |
19 typedef base::Callback<void()> ProfileSwitchingDoneCallback; | 19 typedef base::Callback<void()> ProfileSwitchingDoneCallback; |
20 | 20 |
21 // Different tutorials that can be displayed in the user manager. | |
22 enum UserManagerTutorialMode { | |
23 USER_MANAGER_NO_TUTORIAL, // Does not display a tutorial. | |
24 USER_MANAGER_TUTORIAL_OVERVIEW, // Basic overview of new features. | |
25 USER_MANAGER_TUTORIAL_LOCK // Not yet implemented. | |
26 }; | |
27 | |
21 // Activates a window for |profile| on the desktop specified by | 28 // Activates a window for |profile| on the desktop specified by |
22 // |desktop_type|. If no such window yet exists, or if |always_create| is | 29 // |desktop_type|. If no such window yet exists, or if |always_create| is |
23 // true, this first creates a new window, then activates | 30 // true, this first creates a new window, then activates |
24 // that. If activating an exiting window and multiple windows exists then the | 31 // that. If activating an exiting window and multiple windows exists then the |
25 // window that was most recently active is activated. This is used for | 32 // window that was most recently active is activated. This is used for |
26 // creation of a window from the multi-profile dropdown menu. | 33 // creation of a window from the multi-profile dropdown menu. |
27 void FindOrCreateNewWindowForProfile( | 34 void FindOrCreateNewWindowForProfile( |
28 Profile* profile, | 35 Profile* profile, |
29 chrome::startup::IsProcessStartup process_startup, | 36 chrome::startup::IsProcessStartup process_startup, |
30 chrome::startup::IsFirstRun is_first_run, | 37 chrome::startup::IsFirstRun is_first_run, |
(...skipping 21 matching lines...) Expand all Loading... | |
52 void CreateAndSwitchToNewProfile(chrome::HostDesktopType desktop_type, | 59 void CreateAndSwitchToNewProfile(chrome::HostDesktopType desktop_type, |
53 ProfileSwitchingDoneCallback callback, | 60 ProfileSwitchingDoneCallback callback, |
54 ProfileMetrics::ProfileAdd metric); | 61 ProfileMetrics::ProfileAdd metric); |
55 | 62 |
56 // Closes all browser windows that belong to the guest profile. | 63 // Closes all browser windows that belong to the guest profile. |
57 void CloseGuestProfileWindows(); | 64 void CloseGuestProfileWindows(); |
58 | 65 |
59 // Closes all the browser windows for |profile| and opens the user manager. | 66 // Closes all the browser windows for |profile| and opens the user manager. |
60 void LockProfile(Profile* profile); | 67 void LockProfile(Profile* profile); |
61 | 68 |
69 // Creates or reuses the guest profile needed by the user manager. Based on | |
70 // the value of |tutorial_mode|, it can show a tutorial. If a tutorial is | |
71 // not shown, |profile_path_to_focus| could be used to specify which user | |
72 // pod should be focused. |callback| is ran once the custom url for the | |
Alexei Svitkine (slow)
2014/03/18 15:50:33
What's a user pod?
noms (inactive)
2014/03/19 15:58:20
Done.
| |
73 // user manager has been decided. | |
Alexei Svitkine (slow)
2014/03/18 15:50:33
Can you document what the second param of the call
noms (inactive)
2014/03/19 15:58:20
I thought it was already documented, but I've expa
Alexei Svitkine (slow)
2014/03/19 16:37:01
I meant the 2nd param of |callback|, not the 2nd p
noms (inactive)
2014/03/19 17:10:38
Done.
| |
74 void CreateGuestProfileForUserManager( | |
75 const base::FilePath& profile_path_to_focus, | |
76 profiles::UserManagerTutorialMode tutorial_mode, | |
77 const base::Callback<void(Profile*, const std::string&)>& callback); | |
78 | |
62 } // namespace profiles | 79 } // namespace profiles |
63 | 80 |
64 #endif // CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ | 81 #endif // CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ |
OLD | NEW |