Home | History | Annotate | Download | only in profiles
      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.
      4 
      5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_
      6 #define CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_
      7 
      8 #include "chrome/browser/ui/host_desktop.h"
      9 #include "chrome/browser/ui/startup/startup_types.h"
     10 
     11 class Profile;
     12 namespace base { class FilePath; }
     13 
     14 namespace profiles {
     15 
     16 // Activates a window for |profile| on the desktop specified by
     17 // |desktop_type|. If no such window yet exists, or if |always_create| is
     18 // true, this first creates a new window, then activates
     19 // that. If activating an exiting window and multiple windows exists then the
     20 // window that was most recently active is activated. This is used for
     21 // creation of a window from the multi-profile dropdown menu.
     22 void FindOrCreateNewWindowForProfile(
     23     Profile* profile,
     24     chrome::startup::IsProcessStartup process_startup,
     25     chrome::startup::IsFirstRun is_first_run,
     26     chrome::HostDesktopType desktop_type,
     27     bool always_create);
     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 
     37 }  // namespace profiles
     38 
     39 #endif  // CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_
     40