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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // Activates a window for |profile| on the desktop specified by | 50 // Activates a window for |profile| on the desktop specified by |
51 // |desktop_type|. If no such window yet exists, or if |always_create| is | 51 // |desktop_type|. If no such window yet exists, or if |always_create| is |
52 // true, this first creates a new window, then activates | 52 // true, this first creates a new window, then activates |
53 // that. If activating an exiting window and multiple windows exists then the | 53 // that. If activating an exiting window and multiple windows exists then the |
54 // window that was most recently active is activated. This is used for | 54 // window that was most recently active is activated. This is used for |
55 // creation of a window from the multi-profile dropdown menu. | 55 // creation of a window from the multi-profile dropdown menu. |
56 void FindOrCreateNewWindowForProfile( | 56 void FindOrCreateNewWindowForProfile( |
57 Profile* profile, | 57 Profile* profile, |
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 ui::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 void SwitchToProfile(const base::FilePath& path, | 68 void SwitchToProfile(const base::FilePath& path, |
69 chrome::HostDesktopType desktop_type, | 69 ui::HostDesktopType desktop_type, |
70 bool always_create, | 70 bool always_create, |
71 ProfileManager::CreateCallback callback, | 71 ProfileManager::CreateCallback callback, |
72 ProfileMetrics::ProfileOpen metric); | 72 ProfileMetrics::ProfileOpen metric); |
73 | 73 |
74 // Opens a Browser for the guest profile and runs |callback| if it isn't null. | 74 // Opens a Browser for the guest profile and runs |callback| if it isn't null. |
75 void SwitchToGuestProfile(chrome::HostDesktopType desktop_type, | 75 void SwitchToGuestProfile(ui::HostDesktopType desktop_type, |
76 ProfileManager::CreateCallback callback); | 76 ProfileManager::CreateCallback callback); |
77 | 77 |
78 // Returns true if |profile| has potential profile switch targets, ie there's at | 78 // 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 | 79 // 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 | 80 // 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. | 81 // one and the current window is a guest window. |
82 bool HasProfileSwitchTargets(Profile* profile); | 82 bool HasProfileSwitchTargets(Profile* profile); |
83 | 83 |
84 // Creates a new profile from the next available profile directory, and | 84 // 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 | 85 // 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. | 86 // is opened, |callback| will be run if it isn't null. |
87 void CreateAndSwitchToNewProfile(chrome::HostDesktopType desktop_type, | 87 void CreateAndSwitchToNewProfile(ui::HostDesktopType desktop_type, |
88 ProfileManager::CreateCallback callback, | 88 ProfileManager::CreateCallback callback, |
89 ProfileMetrics::ProfileAdd metric); | 89 ProfileMetrics::ProfileAdd metric); |
90 | 90 |
91 // Closes all browser windows that belong to the guest profile. | 91 // Closes all browser windows that belong to the guest profile. |
92 void CloseGuestProfileWindows(); | 92 void CloseGuestProfileWindows(); |
93 | 93 |
94 // Closes all the browser windows for |profile| and opens the user manager. | 94 // Closes all the browser windows for |profile| and opens the user manager. |
95 void LockProfile(Profile* profile); | 95 void LockProfile(Profile* profile); |
96 | 96 |
97 // Returns whether lock is available to this profile. | 97 // Returns whether lock is available to this profile. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 bool ShouldShowWelcomeUpgradeTutorial( | 133 bool ShouldShowWelcomeUpgradeTutorial( |
134 Profile* profile, TutorialMode tutorial_mode); | 134 Profile* profile, TutorialMode tutorial_mode); |
135 | 135 |
136 // Returns true if the tutorial informing the user about right-click user | 136 // Returns true if the tutorial informing the user about right-click user |
137 // switching should be shown, false otherwise. | 137 // switching should be shown, false otherwise. |
138 bool ShouldShowRightClickTutorial(Profile* profile); | 138 bool ShouldShowRightClickTutorial(Profile* profile); |
139 | 139 |
140 } // namespace profiles | 140 } // namespace profiles |
141 | 141 |
142 #endif // CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ | 142 #endif // CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ |
OLD | NEW |