blob: d5d3887ab23fe8b71efecbfc0ab3c0aed550a29f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_
#define CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#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 ProfileHelper;
class TimeZoneResolver;
}
namespace chromeos {
namespace system {
class AutomaticRebootManager;
class DeviceDisablingManager;
class DeviceDisablingManagerDefaultDelegate;
class SystemClock;
}
}
namespace policy {
class BrowserPolicyConnector;
class BrowserPolicyConnectorChromeOS;
}
namespace session_manager {
class SessionManager;
}
class Profile;
class ScopedKeepAlive;
class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase,
public base::NonThreadSafe {
public:
BrowserProcessPlatformPart();
~BrowserProcessPlatformPart() override;
void InitializeAutomaticRebootManager();
void ShutdownAutomaticRebootManager();
void InitializeChromeUserManager();
void DestroyChromeUserManager();
void InitializeDeviceDisablingManager();
void ShutdownDeviceDisablingManager();
void InitializeSessionManager(const base::CommandLine& parsed_command_line,
Profile* profile,
bool is_running_test);
void ShutdownSessionManager();
// Disable the offline interstitial easter egg if the device is enterprise
// enrolled.
void DisableDinoEasterEggIfEnrolled();
// 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();
// Used to register a KeepAlive when Ash is initialized, and release it
// when until Chrome starts exiting. Ensure we stay running the whole time.
void RegisterKeepAlive();
void UnregisterKeepAlive();
// Returns the ProfileHelper instance that is used to identify
// users and their profiles in Chrome OS multi user session.
chromeos::ProfileHelper* profile_helper();
chromeos::system::AutomaticRebootManager* automatic_reboot_manager() {
return automatic_reboot_manager_.get();
}
policy::BrowserPolicyConnectorChromeOS* browser_policy_connector_chromeos();
chromeos::ChromeUserManager* user_manager() {
return chrome_user_manager_.get();
}
chromeos::system::DeviceDisablingManager* device_disabling_manager() {
return device_disabling_manager_.get();
}
chromeos::TimeZoneResolver* GetTimezoneResolver();
// Overridden from BrowserProcessPlatformPartBase:
void StartTearDown() override;
scoped_ptr<policy::BrowserPolicyConnector> CreateBrowserPolicyConnector()
override;
chromeos::system::SystemClock* GetSystemClock();
private:
void CreateProfileHelper();
scoped_ptr<session_manager::SessionManager> session_manager_;
bool created_profile_helper_;
scoped_ptr<chromeos::ProfileHelper> profile_helper_;
scoped_ptr<chromeos::system::AutomaticRebootManager>
automatic_reboot_manager_;
scoped_ptr<chromeos::ChromeUserManager> chrome_user_manager_;
scoped_ptr<chromeos::system::DeviceDisablingManagerDefaultDelegate>
device_disabling_manager_delegate_;
scoped_ptr<chromeos::system::DeviceDisablingManager>
device_disabling_manager_;
scoped_ptr<chromeos::TimeZoneResolver> timezone_resolver_;
scoped_ptr<chromeos::system::SystemClock> system_clock_;
scoped_ptr<ScopedKeepAlive> keep_alive_;
DISALLOW_COPY_AND_ASSIGN(BrowserProcessPlatformPart);
};
#endif // CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_
|