| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_ | 6 #define CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/threading/non_thread_safe.h" | 10 #include "base/threading/non_thread_safe.h" |
| 11 #include "chrome/browser/browser_process_platform_part_base.h" | 11 #include "chrome/browser/browser_process_platform_part_base.h" |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 class CommandLine; | 14 class CommandLine; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace chromeos { | 17 namespace chromeos { |
| 18 class ChromeUserManager; |
| 18 class OomPriorityManager; | 19 class OomPriorityManager; |
| 19 class ProfileHelper; | 20 class ProfileHelper; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace chromeos { | 23 namespace chromeos { |
| 23 namespace system { | 24 namespace system { |
| 24 class AutomaticRebootManager; | 25 class AutomaticRebootManager; |
| 25 } | 26 } |
| 26 } | 27 } |
| 27 | 28 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 38 | 39 |
| 39 class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase, | 40 class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase, |
| 40 public base::NonThreadSafe { | 41 public base::NonThreadSafe { |
| 41 public: | 42 public: |
| 42 BrowserProcessPlatformPart(); | 43 BrowserProcessPlatformPart(); |
| 43 virtual ~BrowserProcessPlatformPart(); | 44 virtual ~BrowserProcessPlatformPart(); |
| 44 | 45 |
| 45 void InitializeAutomaticRebootManager(); | 46 void InitializeAutomaticRebootManager(); |
| 46 void ShutdownAutomaticRebootManager(); | 47 void ShutdownAutomaticRebootManager(); |
| 47 | 48 |
| 49 void InitializeChromeUserManager(); |
| 50 void DestroyChromeUserManager(); |
| 51 |
| 48 void InitializeSessionManager(const base::CommandLine& parsed_command_line, | 52 void InitializeSessionManager(const base::CommandLine& parsed_command_line, |
| 49 Profile* profile, | 53 Profile* profile, |
| 50 bool is_running_test); | 54 bool is_running_test); |
| 51 void ShutdownSessionManager(); | 55 void ShutdownSessionManager(); |
| 52 | 56 |
| 53 // Returns the SessionManager instance that is used to initialize and | 57 // Returns the SessionManager instance that is used to initialize and |
| 54 // start user sessions as well as responsible on launching pre-session UI like | 58 // start user sessions as well as responsible on launching pre-session UI like |
| 55 // out-of-box or login. | 59 // out-of-box or login. |
| 56 virtual session_manager::SessionManager* SessionManager(); | 60 virtual session_manager::SessionManager* SessionManager(); |
| 57 | 61 |
| 58 // Returns the out-of-memory priority manager. | 62 // Returns the out-of-memory priority manager. |
| 59 // Virtual for testing (see TestingBrowserProcessPlatformPart). | 63 // Virtual for testing (see TestingBrowserProcessPlatformPart). |
| 60 virtual chromeos::OomPriorityManager* oom_priority_manager(); | 64 virtual chromeos::OomPriorityManager* oom_priority_manager(); |
| 61 | 65 |
| 62 // Returns the ProfileHelper instance that is used to identify | 66 // Returns the ProfileHelper instance that is used to identify |
| 63 // users and their profiles in Chrome OS multi user session. | 67 // users and their profiles in Chrome OS multi user session. |
| 64 chromeos::ProfileHelper* profile_helper(); | 68 chromeos::ProfileHelper* profile_helper(); |
| 65 | 69 |
| 66 chromeos::system::AutomaticRebootManager* automatic_reboot_manager() { | 70 chromeos::system::AutomaticRebootManager* automatic_reboot_manager() { |
| 67 return automatic_reboot_manager_.get(); | 71 return automatic_reboot_manager_.get(); |
| 68 } | 72 } |
| 69 | 73 |
| 70 policy::BrowserPolicyConnectorChromeOS* browser_policy_connector_chromeos(); | 74 policy::BrowserPolicyConnectorChromeOS* browser_policy_connector_chromeos(); |
| 71 | 75 |
| 76 chromeos::ChromeUserManager* user_manager() { |
| 77 return chrome_user_manager_.get(); |
| 78 } |
| 79 |
| 72 // Overridden from BrowserProcessPlatformPartBase: | 80 // Overridden from BrowserProcessPlatformPartBase: |
| 73 virtual void StartTearDown() OVERRIDE; | 81 virtual void StartTearDown() OVERRIDE; |
| 74 | 82 |
| 75 virtual scoped_ptr<policy::BrowserPolicyConnector> | 83 virtual scoped_ptr<policy::BrowserPolicyConnector> |
| 76 CreateBrowserPolicyConnector() OVERRIDE; | 84 CreateBrowserPolicyConnector() OVERRIDE; |
| 77 | 85 |
| 78 private: | 86 private: |
| 79 void CreateProfileHelper(); | 87 void CreateProfileHelper(); |
| 80 | 88 |
| 81 scoped_ptr<session_manager::SessionManager> session_manager_; | 89 scoped_ptr<session_manager::SessionManager> session_manager_; |
| 82 | 90 |
| 83 bool created_profile_helper_; | 91 bool created_profile_helper_; |
| 84 scoped_ptr<chromeos::ProfileHelper> profile_helper_; | 92 scoped_ptr<chromeos::ProfileHelper> profile_helper_; |
| 85 | 93 |
| 86 scoped_ptr<chromeos::OomPriorityManager> oom_priority_manager_; | 94 scoped_ptr<chromeos::OomPriorityManager> oom_priority_manager_; |
| 87 | 95 |
| 88 scoped_ptr<chromeos::system::AutomaticRebootManager> | 96 scoped_ptr<chromeos::system::AutomaticRebootManager> |
| 89 automatic_reboot_manager_; | 97 automatic_reboot_manager_; |
| 90 | 98 |
| 99 scoped_ptr<chromeos::ChromeUserManager> chrome_user_manager_; |
| 100 |
| 91 DISALLOW_COPY_AND_ASSIGN(BrowserProcessPlatformPart); | 101 DISALLOW_COPY_AND_ASSIGN(BrowserProcessPlatformPart); |
| 92 }; | 102 }; |
| 93 | 103 |
| 94 #endif // CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_ | 104 #endif // CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_ |
| OLD | NEW |