Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / browser_process_platform_part_chromeos.h
index 08dc683..06e8b64 100644 (file)
 #include "base/threading/non_thread_safe.h"
 #include "chrome/browser/browser_process_platform_part_base.h"
 
+namespace base {
+class CommandLine;
+}
+
 namespace chromeos {
+class ChromeUserManager;
 class OomPriorityManager;
 class ProfileHelper;
 }
@@ -21,6 +26,17 @@ class AutomaticRebootManager;
 }
 }
 
+namespace policy {
+class BrowserPolicyConnector;
+class BrowserPolicyConnectorChromeOS;
+}
+
+namespace session_manager {
+class SessionManager;
+}
+
+class Profile;
+
 class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase,
                                    public base::NonThreadSafe {
  public:
@@ -30,32 +46,58 @@ class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase,
   void InitializeAutomaticRebootManager();
   void ShutdownAutomaticRebootManager();
 
+  void InitializeChromeUserManager();
+  void DestroyChromeUserManager();
+
+  void InitializeSessionManager(const base::CommandLine& parsed_command_line,
+                                Profile* profile,
+                                bool is_running_test);
+  void ShutdownSessionManager();
+
+  // Returns the SessionManager instance that is used to initialize and
+  // start user sessions as well as responsible on launching pre-session UI like
+  // out-of-box or login.
+  virtual session_manager::SessionManager* SessionManager();
+
   // Returns the out-of-memory priority manager.
+  // Virtual for testing (see TestingBrowserProcessPlatformPart).
   virtual chromeos::OomPriorityManager* oom_priority_manager();
 
   // Returns the ProfileHelper instance that is used to identify
   // users and their profiles in Chrome OS multi user session.
-  virtual chromeos::ProfileHelper* profile_helper();
-
-  // Overridden from BrowserProcessPlatformPartBase:
-  virtual void StartTearDown() OVERRIDE;
+  chromeos::ProfileHelper* profile_helper();
 
   chromeos::system::AutomaticRebootManager* automatic_reboot_manager() {
     return automatic_reboot_manager_.get();
   }
 
- protected:
-  virtual void CreateProfileHelper();
+  policy::BrowserPolicyConnectorChromeOS* browser_policy_connector_chromeos();
+
+  chromeos::ChromeUserManager* user_manager() {
+    return chrome_user_manager_.get();
+  }
+
+  // Overridden from BrowserProcessPlatformPartBase:
+  virtual void StartTearDown() OVERRIDE;
+
+  virtual scoped_ptr<policy::BrowserPolicyConnector>
+      CreateBrowserPolicyConnector() OVERRIDE;
+
+ private:
+  void CreateProfileHelper();
+
+  scoped_ptr<session_manager::SessionManager> session_manager_;
 
   bool created_profile_helper_;
   scoped_ptr<chromeos::ProfileHelper> profile_helper_;
 
- private:
   scoped_ptr<chromeos::OomPriorityManager> oom_priority_manager_;
 
   scoped_ptr<chromeos::system::AutomaticRebootManager>
       automatic_reboot_manager_;
 
+  scoped_ptr<chromeos::ChromeUserManager> chrome_user_manager_;
+
   DISALLOW_COPY_AND_ASSIGN(BrowserProcessPlatformPart);
 };