| 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 "chrome/browser/ui/host_desktop.h" | 8 #include "chrome/browser/ui/host_desktop.h" |
| 9 #include "chrome/browser/ui/startup/startup_types.h" | 9 #include "chrome/browser/ui/startup/startup_types.h" |
| 10 | 10 |
| 11 class Profile; | 11 class Profile; |
| 12 namespace base { class FilePath; } |
| 12 | 13 |
| 13 namespace profiles { | 14 namespace profiles { |
| 14 | 15 |
| 15 // Activates a window for |profile| on the desktop specified by | 16 // Activates a window for |profile| on the desktop specified by |
| 16 // |desktop_type|. If no such window yet exists, or if |always_create| is | 17 // |desktop_type|. If no such window yet exists, or if |always_create| is |
| 17 // true, this first creates a new window, then activates | 18 // true, this first creates a new window, then activates |
| 18 // that. If activating an exiting window and multiple windows exists then the | 19 // that. If activating an exiting window and multiple windows exists then the |
| 19 // window that was most recently active is activated. This is used for | 20 // window that was most recently active is activated. This is used for |
| 20 // creation of a window from the multi-profile dropdown menu. | 21 // creation of a window from the multi-profile dropdown menu. |
| 21 void FindOrCreateNewWindowForProfile( | 22 void FindOrCreateNewWindowForProfile( |
| 22 Profile* profile, | 23 Profile* profile, |
| 23 chrome::startup::IsProcessStartup process_startup, | 24 chrome::startup::IsProcessStartup process_startup, |
| 24 chrome::startup::IsFirstRun is_first_run, | 25 chrome::startup::IsFirstRun is_first_run, |
| 25 chrome::HostDesktopType desktop_type, | 26 chrome::HostDesktopType desktop_type, |
| 26 bool always_create); | 27 bool always_create); |
| 27 | 28 |
| 29 // Opens a Browser with the specified profile given by |path|. |
| 30 // If |always_create| is true then a new window is created |
| 31 // even if a window for that profile already exists. |
| 32 void SwitchToProfile( |
| 33 const base::FilePath& path, |
| 34 chrome::HostDesktopType desktop_type, |
| 35 bool always_create); |
| 36 |
| 28 } // namespace profiles | 37 } // namespace profiles |
| 29 | 38 |
| 30 #endif // CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ | 39 #endif // CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ |
| OLD | NEW |