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 "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/browser/profiles/profile_manager.h" | 10 #include "chrome/browser/profiles/profile_manager.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // the case when there are more than 1 profiles available or when there's only | 91 // the case when there are more than 1 profiles available or when there's only |
92 // one and the current window is a guest window. | 92 // one and the current window is a guest window. |
93 bool HasProfileSwitchTargets(Profile* profile); | 93 bool HasProfileSwitchTargets(Profile* profile); |
94 | 94 |
95 // Creates a new profile from the next available profile directory, and | 95 // Creates a new profile from the next available profile directory, and |
96 // opens a new browser window for the profile once it is ready. When the browser | 96 // opens a new browser window for the profile once it is ready. When the browser |
97 // is opened, |callback| will be run if it isn't null. | 97 // is opened, |callback| will be run if it isn't null. |
98 void CreateAndSwitchToNewProfile(ProfileManager::CreateCallback callback, | 98 void CreateAndSwitchToNewProfile(ProfileManager::CreateCallback callback, |
99 ProfileMetrics::ProfileAdd metric); | 99 ProfileMetrics::ProfileAdd metric); |
100 | 100 |
101 // Closes all browser windows that belong to the guest profile. | 101 // Closes all browser windows that belong to the guest profile and opens the |
| 102 // user manager. |
102 void CloseGuestProfileWindows(); | 103 void CloseGuestProfileWindows(); |
103 | 104 |
104 // Closes all the browser windows for |profile| and opens the user manager. | 105 // Closes and locks all the browser windows for |profile| and opens the user |
| 106 // manager. |
105 void LockProfile(Profile* profile); | 107 void LockProfile(Profile* profile); |
106 | 108 |
| 109 // Close all the browser windows for |profile| and opens the user manager. |
| 110 void CloseProfileWindows(Profile* profile); |
| 111 |
107 // Returns whether lock is available to this profile. | 112 // Returns whether lock is available to this profile. |
108 bool IsLockAvailable(Profile* profile); | 113 bool IsLockAvailable(Profile* profile); |
109 | 114 |
110 // Creates or reuses the system profile needed by the user manager. Based on | 115 // Creates or reuses the system profile needed by the user manager. Based on |
111 // the value of |tutorial_mode|, the user manager can show a specific | 116 // the value of |tutorial_mode|, the user manager can show a specific |
112 // tutorial, or no tutorial at all. If a tutorial is not shown, then | 117 // tutorial, or no tutorial at all. If a tutorial is not shown, then |
113 // |profile_path_to_focus| could be used to specify which user should be | 118 // |profile_path_to_focus| could be used to specify which user should be |
114 // focused. After a profile is opened from the user manager, perform | 119 // focused. After a profile is opened from the user manager, perform |
115 // |profile_open_action|. |callback| is run with the custom url to be displayed, | 120 // |profile_open_action|. |callback| is run with the custom url to be displayed, |
116 // as well as a pointer to the guest profile. | 121 // as well as a pointer to the guest profile. |
(...skipping 20 matching lines...) Expand all Loading... |
137 bool ShouldShowWelcomeUpgradeTutorial( | 142 bool ShouldShowWelcomeUpgradeTutorial( |
138 Profile* profile, TutorialMode tutorial_mode); | 143 Profile* profile, TutorialMode tutorial_mode); |
139 | 144 |
140 // Returns true if the tutorial informing the user about right-click user | 145 // Returns true if the tutorial informing the user about right-click user |
141 // switching should be shown, false otherwise. | 146 // switching should be shown, false otherwise. |
142 bool ShouldShowRightClickTutorial(Profile* profile); | 147 bool ShouldShowRightClickTutorial(Profile* profile); |
143 | 148 |
144 } // namespace profiles | 149 } // namespace profiles |
145 | 150 |
146 #endif // CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ | 151 #endif // CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ |
OLD | NEW |