Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: chrome/browser/profiles/profile_window.h

Issue 1686833003: Remove HostDesktopType from profiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-16
Patch Set: desktop linux and mac Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "chrome/browser/profiles/profile_metrics.h" 11 #include "chrome/browser/profiles/profile_metrics.h"
12 #include "chrome/browser/ui/browser_window.h" 12 #include "chrome/browser/ui/browser_window.h"
13 #include "chrome/browser/ui/host_desktop.h"
14 #include "chrome/browser/ui/profile_chooser_constants.h" 13 #include "chrome/browser/ui/profile_chooser_constants.h"
15 #include "chrome/browser/ui/startup/startup_types.h" 14 #include "chrome/browser/ui/startup/startup_types.h"
16 15
17 class Profile; 16 class Profile;
18 namespace base { class FilePath; } 17 namespace base { class FilePath; }
19 18
20 namespace profiles { 19 namespace profiles {
21 20
22 // Different tutorials that can be displayed in the user manager. 21 // Different tutorials that can be displayed in the user manager.
23 enum UserManagerTutorialMode { 22 enum UserManagerTutorialMode {
(...skipping 27 matching lines...) Expand all
51 // Activates a window for |profile| on the desktop specified by 50 // Activates a window for |profile| on the desktop specified by
52 // |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
53 // true, this first creates a new window, then activates 52 // true, this first creates a new window, then activates
54 // 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
55 // 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
56 // creation of a window from the multi-profile dropdown menu. 55 // creation of a window from the multi-profile dropdown menu.
57 void FindOrCreateNewWindowForProfile( 56 void FindOrCreateNewWindowForProfile(
58 Profile* profile, 57 Profile* profile,
59 chrome::startup::IsProcessStartup process_startup, 58 chrome::startup::IsProcessStartup process_startup,
60 chrome::startup::IsFirstRun is_first_run, 59 chrome::startup::IsFirstRun is_first_run,
61 chrome::HostDesktopType desktop_type,
62 bool always_create); 60 bool always_create);
63 61
64 // Opens a Browser with the specified profile given by |path|. 62 // Opens a Browser with the specified profile given by |path|.
65 // If |always_create| is true then a new window is created 63 // If |always_create| is true then a new window is created
66 // even if a window for that profile already exists. When the browser is 64 // even if a window for that profile already exists. When the browser is
67 // opened, |callback| will be run if it isn't null. 65 // opened, |callback| will be run if it isn't null.
68 66
69 #if !defined(OS_ANDROID) 67 #if !defined(OS_ANDROID)
70 void SwitchToProfile(const base::FilePath& path, 68 void SwitchToProfile(const base::FilePath& path,
71 chrome::HostDesktopType desktop_type,
72 bool always_create, 69 bool always_create,
73 ProfileManager::CreateCallback callback, 70 ProfileManager::CreateCallback callback,
74 ProfileMetrics::ProfileOpen metric); 71 ProfileMetrics::ProfileOpen metric);
75 72
76 // Opens a Browser for the guest profile and runs |callback| if it isn't null. 73 // Opens a Browser for the guest profile and runs |callback| if it isn't null.
77 void SwitchToGuestProfile(chrome::HostDesktopType desktop_type, 74 void SwitchToGuestProfile(ProfileManager::CreateCallback callback);
78 ProfileManager::CreateCallback callback);
79 #endif 75 #endif
80 76
81 // Returns true if |profile| has potential profile switch targets, ie there's at 77 // Returns true if |profile| has potential profile switch targets, ie there's at
82 // least one other profile available to switch to, not counting guest. This is 78 // least one other profile available to switch to, not counting guest. This is
83 // the case when there are more than 1 profiles available or when there's only 79 // the case when there are more than 1 profiles available or when there's only
84 // one and the current window is a guest window. 80 // one and the current window is a guest window.
85 bool HasProfileSwitchTargets(Profile* profile); 81 bool HasProfileSwitchTargets(Profile* profile);
86 82
87 // Creates a new profile from the next available profile directory, and 83 // Creates a new profile from the next available profile directory, and
88 // opens a new browser window for the profile once it is ready. When the browser 84 // opens a new browser window for the profile once it is ready. When the browser
89 // is opened, |callback| will be run if it isn't null. 85 // is opened, |callback| will be run if it isn't null.
90 void CreateAndSwitchToNewProfile(chrome::HostDesktopType desktop_type, 86 void CreateAndSwitchToNewProfile(ProfileManager::CreateCallback callback,
91 ProfileManager::CreateCallback callback,
92 ProfileMetrics::ProfileAdd metric); 87 ProfileMetrics::ProfileAdd metric);
93 88
94 // Closes all browser windows that belong to the guest profile. 89 // Closes all browser windows that belong to the guest profile.
95 void CloseGuestProfileWindows(); 90 void CloseGuestProfileWindows();
96 91
97 // Closes all the browser windows for |profile| and opens the user manager. 92 // Closes all the browser windows for |profile| and opens the user manager.
98 void LockProfile(Profile* profile); 93 void LockProfile(Profile* profile);
99 94
100 // Returns whether lock is available to this profile. 95 // Returns whether lock is available to this profile.
101 bool IsLockAvailable(Profile* profile); 96 bool IsLockAvailable(Profile* profile);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 bool ShouldShowWelcomeUpgradeTutorial( 131 bool ShouldShowWelcomeUpgradeTutorial(
137 Profile* profile, TutorialMode tutorial_mode); 132 Profile* profile, TutorialMode tutorial_mode);
138 133
139 // Returns true if the tutorial informing the user about right-click user 134 // Returns true if the tutorial informing the user about right-click user
140 // switching should be shown, false otherwise. 135 // switching should be shown, false otherwise.
141 bool ShouldShowRightClickTutorial(Profile* profile); 136 bool ShouldShowRightClickTutorial(Profile* profile);
142 137
143 } // namespace profiles 138 } // namespace profiles
144 139
145 #endif // CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ 140 #endif // CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_manager_browsertest.cc ('k') | chrome/browser/profiles/profile_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698