| 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 { |
| 14 class CommandLine; |
| 15 } |
| 16 |
| 13 namespace chromeos { | 17 namespace chromeos { |
| 14 class OomPriorityManager; | 18 class OomPriorityManager; |
| 15 class ProfileHelper; | 19 class ProfileHelper; |
| 16 } | 20 } |
| 17 | 21 |
| 18 namespace chromeos { | 22 namespace chromeos { |
| 19 namespace system { | 23 namespace system { |
| 20 class AutomaticRebootManager; | 24 class AutomaticRebootManager; |
| 21 } | 25 } |
| 22 } | 26 } |
| 23 | 27 |
| 24 namespace policy { | 28 namespace policy { |
| 25 class BrowserPolicyConnector; | 29 class BrowserPolicyConnector; |
| 26 class BrowserPolicyConnectorChromeOS; | 30 class BrowserPolicyConnectorChromeOS; |
| 27 } | 31 } |
| 28 | 32 |
| 33 namespace session_manager { |
| 34 class SessionManager; |
| 35 } |
| 36 |
| 37 class Profile; |
| 38 |
| 29 class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase, | 39 class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase, |
| 30 public base::NonThreadSafe { | 40 public base::NonThreadSafe { |
| 31 public: | 41 public: |
| 32 BrowserProcessPlatformPart(); | 42 BrowserProcessPlatformPart(); |
| 33 virtual ~BrowserProcessPlatformPart(); | 43 virtual ~BrowserProcessPlatformPart(); |
| 34 | 44 |
| 35 void InitializeAutomaticRebootManager(); | 45 void InitializeAutomaticRebootManager(); |
| 36 void ShutdownAutomaticRebootManager(); | 46 void ShutdownAutomaticRebootManager(); |
| 37 | 47 |
| 48 void InitializeSessionManager(const base::CommandLine& parsed_command_line, |
| 49 Profile* profile, |
| 50 bool is_running_test); |
| 51 void ShutdownSessionManager(); |
| 52 |
| 53 // Returns the SessionManager instance that is used to initialize and |
| 54 // start user sessions as well as responsible on launching pre-session UI like |
| 55 // out-of-box or login. |
| 56 virtual session_manager::SessionManager* session_manager(); |
| 57 |
| 38 // Returns the out-of-memory priority manager. | 58 // Returns the out-of-memory priority manager. |
| 39 // Virtual for testing (see TestingBrowserProcessPlatformPart). | 59 // Virtual for testing (see TestingBrowserProcessPlatformPart). |
| 40 virtual chromeos::OomPriorityManager* oom_priority_manager(); | 60 virtual chromeos::OomPriorityManager* oom_priority_manager(); |
| 41 | 61 |
| 42 // Returns the ProfileHelper instance that is used to identify | 62 // Returns the ProfileHelper instance that is used to identify |
| 43 // users and their profiles in Chrome OS multi user session. | 63 // users and their profiles in Chrome OS multi user session. |
| 44 chromeos::ProfileHelper* profile_helper(); | 64 chromeos::ProfileHelper* profile_helper(); |
| 45 | 65 |
| 46 chromeos::system::AutomaticRebootManager* automatic_reboot_manager() { | 66 chromeos::system::AutomaticRebootManager* automatic_reboot_manager() { |
| 47 return automatic_reboot_manager_.get(); | 67 return automatic_reboot_manager_.get(); |
| 48 } | 68 } |
| 49 | 69 |
| 50 policy::BrowserPolicyConnectorChromeOS* browser_policy_connector_chromeos(); | 70 policy::BrowserPolicyConnectorChromeOS* browser_policy_connector_chromeos(); |
| 51 | 71 |
| 52 // Overridden from BrowserProcessPlatformPartBase: | 72 // Overridden from BrowserProcessPlatformPartBase: |
| 53 virtual void StartTearDown() OVERRIDE; | 73 virtual void StartTearDown() OVERRIDE; |
| 54 | 74 |
| 55 virtual scoped_ptr<policy::BrowserPolicyConnector> | 75 virtual scoped_ptr<policy::BrowserPolicyConnector> |
| 56 CreateBrowserPolicyConnector() OVERRIDE; | 76 CreateBrowserPolicyConnector() OVERRIDE; |
| 57 | 77 |
| 58 private: | 78 private: |
| 59 void CreateProfileHelper(); | 79 void CreateProfileHelper(); |
| 60 | 80 |
| 81 scoped_ptr<session_manager::SessionManager> session_manager_; |
| 82 |
| 61 bool created_profile_helper_; | 83 bool created_profile_helper_; |
| 62 scoped_ptr<chromeos::ProfileHelper> profile_helper_; | 84 scoped_ptr<chromeos::ProfileHelper> profile_helper_; |
| 63 | 85 |
| 64 scoped_ptr<chromeos::OomPriorityManager> oom_priority_manager_; | 86 scoped_ptr<chromeos::OomPriorityManager> oom_priority_manager_; |
| 65 | 87 |
| 66 scoped_ptr<chromeos::system::AutomaticRebootManager> | 88 scoped_ptr<chromeos::system::AutomaticRebootManager> |
| 67 automatic_reboot_manager_; | 89 automatic_reboot_manager_; |
| 68 | 90 |
| 69 DISALLOW_COPY_AND_ASSIGN(BrowserProcessPlatformPart); | 91 DISALLOW_COPY_AND_ASSIGN(BrowserProcessPlatformPart); |
| 70 }; | 92 }; |
| 71 | 93 |
| 72 #endif // CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_ | 94 #endif // CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_ |
| OLD | NEW |