Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / profiles / profile_window.h
blob1339d9497000e90de51ad6e35c018840758964fa
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_
8 #include "base/callback_forward.h"
9 #include "chrome/browser/ui/host_desktop.h"
10 #include "chrome/browser/ui/startup/startup_types.h"
12 class Profile;
13 namespace base { class FilePath; }
15 namespace profiles {
17 // Callback to be used when switching to a new profile is completed.
18 typedef base::Callback<void()> ProfileSwitchingDoneCallback;
20 // Activates a window for |profile| on the desktop specified by
21 // |desktop_type|. If no such window yet exists, or if |always_create| is
22 // true, this first creates a new window, then activates
23 // that. If activating an exiting window and multiple windows exists then the
24 // window that was most recently active is activated. This is used for
25 // creation of a window from the multi-profile dropdown menu.
26 void FindOrCreateNewWindowForProfile(
27 Profile* profile,
28 chrome::startup::IsProcessStartup process_startup,
29 chrome::startup::IsFirstRun is_first_run,
30 chrome::HostDesktopType desktop_type,
31 bool always_create);
33 // Opens a Browser with the specified profile given by |path|.
34 // If |always_create| is true then a new window is created
35 // even if a window for that profile already exists. When the browser is
36 // opened, |callback| will be run if it isn't null.
38 void SwitchToProfile(
39 const base::FilePath& path,
40 chrome::HostDesktopType desktop_type,
41 bool always_create,
42 ProfileSwitchingDoneCallback callback);
44 // Opens a Browser for the guest profile and runs |callback| if it isn't null.
45 void SwitchToGuestProfile(chrome::HostDesktopType desktop_type,
46 ProfileSwitchingDoneCallback callback);
48 // Creates a new profile from the next available profile directory, and
49 // opens a new browser window for the profile once it is ready. When the browser
50 // is opened, |callback| will be run if it isn't null.
51 void CreateAndSwitchToNewProfile(chrome::HostDesktopType desktop_type,
52 ProfileSwitchingDoneCallback callback);
54 // Closes all browser windows that belong to the guest profile.
55 void CloseGuestProfileWindows();
57 // Closes all the browser windows for |profile| and opens the user manager.
58 void LockProfile(Profile* profile);
60 } // namespace profiles
62 #endif // CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_