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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_
6 #define CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/threading/non_thread_safe.h"
11 #include "chrome/browser/browser_process_platform_part_base.h"
18 class ChromeUserManager
;
20 class TimeZoneResolver
;
25 class AutomaticRebootManager
;
26 class DeviceDisablingManager
;
27 class DeviceDisablingManagerDefaultDelegate
;
32 class BrowserPolicyConnector
;
33 class BrowserPolicyConnectorChromeOS
;
36 namespace session_manager
{
42 class BrowserProcessPlatformPart
: public BrowserProcessPlatformPartBase
,
43 public base::NonThreadSafe
{
45 BrowserProcessPlatformPart();
46 ~BrowserProcessPlatformPart() override
;
48 void InitializeAutomaticRebootManager();
49 void ShutdownAutomaticRebootManager();
51 void InitializeChromeUserManager();
52 void DestroyChromeUserManager();
54 void InitializeDeviceDisablingManager();
55 void ShutdownDeviceDisablingManager();
57 void InitializeSessionManager(const base::CommandLine
& parsed_command_line
,
59 bool is_running_test
);
60 void ShutdownSessionManager();
62 // Disable the offline interstitial easter egg if the device is enterprise
64 void DisableDinoEasterEggIfEnrolled();
66 // Returns the SessionManager instance that is used to initialize and
67 // start user sessions as well as responsible on launching pre-session UI like
68 // out-of-box or login.
69 virtual session_manager::SessionManager
* SessionManager();
71 // Returns the ProfileHelper instance that is used to identify
72 // users and their profiles in Chrome OS multi user session.
73 chromeos::ProfileHelper
* profile_helper();
75 chromeos::system::AutomaticRebootManager
* automatic_reboot_manager() {
76 return automatic_reboot_manager_
.get();
79 policy::BrowserPolicyConnectorChromeOS
* browser_policy_connector_chromeos();
81 chromeos::ChromeUserManager
* user_manager() {
82 return chrome_user_manager_
.get();
85 chromeos::system::DeviceDisablingManager
* device_disabling_manager() {
86 return device_disabling_manager_
.get();
89 chromeos::TimeZoneResolver
* GetTimezoneResolver();
91 // Overridden from BrowserProcessPlatformPartBase:
92 void StartTearDown() override
;
94 scoped_ptr
<policy::BrowserPolicyConnector
> CreateBrowserPolicyConnector()
98 void CreateProfileHelper();
100 scoped_ptr
<session_manager::SessionManager
> session_manager_
;
102 bool created_profile_helper_
;
103 scoped_ptr
<chromeos::ProfileHelper
> profile_helper_
;
105 scoped_ptr
<chromeos::system::AutomaticRebootManager
>
106 automatic_reboot_manager_
;
108 scoped_ptr
<chromeos::ChromeUserManager
> chrome_user_manager_
;
110 scoped_ptr
<chromeos::system::DeviceDisablingManagerDefaultDelegate
>
111 device_disabling_manager_delegate_
;
112 scoped_ptr
<chromeos::system::DeviceDisablingManager
>
113 device_disabling_manager_
;
115 scoped_ptr
<chromeos::TimeZoneResolver
> timezone_resolver_
;
117 DISALLOW_COPY_AND_ASSIGN(BrowserProcessPlatformPart
);
120 #endif // CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_