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_manager.h" | 9 #include "chrome/browser/profiles/profile_manager.h" |
10 #include "chrome/browser/profiles/profile_metrics.h" | 10 #include "chrome/browser/profiles/profile_metrics.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 chrome::startup::IsProcessStartup process_startup, | 58 chrome::startup::IsProcessStartup process_startup, |
59 chrome::startup::IsFirstRun is_first_run, | 59 chrome::startup::IsFirstRun is_first_run, |
60 chrome::HostDesktopType desktop_type, | 60 chrome::HostDesktopType desktop_type, |
61 bool always_create); | 61 bool always_create); |
62 | 62 |
63 // Opens a Browser with the specified profile given by |path|. | 63 // Opens a Browser with the specified profile given by |path|. |
64 // If |always_create| is true then a new window is created | 64 // If |always_create| is true then a new window is created |
65 // even if a window for that profile already exists. When the browser is | 65 // even if a window for that profile already exists. When the browser is |
66 // opened, |callback| will be run if it isn't null. | 66 // opened, |callback| will be run if it isn't null. |
67 | 67 |
| 68 #if !defined(OS_ANDROID) |
68 void SwitchToProfile(const base::FilePath& path, | 69 void SwitchToProfile(const base::FilePath& path, |
69 chrome::HostDesktopType desktop_type, | 70 chrome::HostDesktopType desktop_type, |
70 bool always_create, | 71 bool always_create, |
71 ProfileManager::CreateCallback callback, | 72 ProfileManager::CreateCallback callback, |
72 ProfileMetrics::ProfileOpen metric); | 73 ProfileMetrics::ProfileOpen metric); |
73 | 74 |
74 // Opens a Browser for the guest profile and runs |callback| if it isn't null. | 75 // Opens a Browser for the guest profile and runs |callback| if it isn't null. |
75 void SwitchToGuestProfile(chrome::HostDesktopType desktop_type, | 76 void SwitchToGuestProfile(chrome::HostDesktopType desktop_type, |
76 ProfileManager::CreateCallback callback); | 77 ProfileManager::CreateCallback callback); |
| 78 #endif |
77 | 79 |
78 // Returns true if |profile| has potential profile switch targets, ie there's at | 80 // Returns true if |profile| has potential profile switch targets, ie there's at |
79 // least one other profile available to switch to, not counting guest. This is | 81 // least one other profile available to switch to, not counting guest. This is |
80 // the case when there are more than 1 profiles available or when there's only | 82 // the case when there are more than 1 profiles available or when there's only |
81 // one and the current window is a guest window. | 83 // one and the current window is a guest window. |
82 bool HasProfileSwitchTargets(Profile* profile); | 84 bool HasProfileSwitchTargets(Profile* profile); |
83 | 85 |
84 // Creates a new profile from the next available profile directory, and | 86 // Creates a new profile from the next available profile directory, and |
85 // opens a new browser window for the profile once it is ready. When the browser | 87 // opens a new browser window for the profile once it is ready. When the browser |
86 // is opened, |callback| will be run if it isn't null. | 88 // is opened, |callback| will be run if it isn't null. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 bool ShouldShowWelcomeUpgradeTutorial( | 135 bool ShouldShowWelcomeUpgradeTutorial( |
134 Profile* profile, TutorialMode tutorial_mode); | 136 Profile* profile, TutorialMode tutorial_mode); |
135 | 137 |
136 // Returns true if the tutorial informing the user about right-click user | 138 // Returns true if the tutorial informing the user about right-click user |
137 // switching should be shown, false otherwise. | 139 // switching should be shown, false otherwise. |
138 bool ShouldShowRightClickTutorial(Profile* profile); | 140 bool ShouldShowRightClickTutorial(Profile* profile); |
139 | 141 |
140 } // namespace profiles | 142 } // namespace profiles |
141 | 143 |
142 #endif // CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ | 144 #endif // CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ |
OLD | NEW |