Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / browser_process_platform_part_chromeos.h
blob6012af98c7321305d642e27ce6bd475032bdc3dd
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"
13 namespace base {
14 class CommandLine;
17 namespace chromeos {
18 class ChromeUserManager;
19 class OomPriorityManager;
20 class ProfileHelper;
21 class TimeZoneResolver;
24 namespace chromeos {
25 namespace system {
26 class AutomaticRebootManager;
27 class DeviceDisablingManager;
28 class DeviceDisablingManagerDefaultDelegate;
32 namespace policy {
33 class BrowserPolicyConnector;
34 class BrowserPolicyConnectorChromeOS;
37 namespace session_manager {
38 class SessionManager;
41 class Profile;
43 class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase,
44 public base::NonThreadSafe {
45 public:
46 BrowserProcessPlatformPart();
47 ~BrowserProcessPlatformPart() override;
49 void InitializeAutomaticRebootManager();
50 void ShutdownAutomaticRebootManager();
52 void InitializeChromeUserManager();
53 void DestroyChromeUserManager();
55 void InitializeDeviceDisablingManager();
56 void ShutdownDeviceDisablingManager();
58 void InitializeSessionManager(const base::CommandLine& parsed_command_line,
59 Profile* profile,
60 bool is_running_test);
61 void ShutdownSessionManager();
63 // Disable the offline interstitial easter egg if the device is enterprise
64 // enrolled.
65 void DisableDinoEasterEggIfEnrolled();
67 // Returns the SessionManager instance that is used to initialize and
68 // start user sessions as well as responsible on launching pre-session UI like
69 // out-of-box or login.
70 virtual session_manager::SessionManager* SessionManager();
72 // Returns the out-of-memory priority manager.
73 // Virtual for testing (see TestingBrowserProcessPlatformPart).
74 virtual chromeos::OomPriorityManager* oom_priority_manager();
76 // Returns the ProfileHelper instance that is used to identify
77 // users and their profiles in Chrome OS multi user session.
78 chromeos::ProfileHelper* profile_helper();
80 chromeos::system::AutomaticRebootManager* automatic_reboot_manager() {
81 return automatic_reboot_manager_.get();
84 policy::BrowserPolicyConnectorChromeOS* browser_policy_connector_chromeos();
86 chromeos::ChromeUserManager* user_manager() {
87 return chrome_user_manager_.get();
90 chromeos::system::DeviceDisablingManager* device_disabling_manager() {
91 return device_disabling_manager_.get();
94 chromeos::TimeZoneResolver* GetTimezoneResolver();
96 // Overridden from BrowserProcessPlatformPartBase:
97 void StartTearDown() override;
99 scoped_ptr<policy::BrowserPolicyConnector> CreateBrowserPolicyConnector()
100 override;
102 private:
103 void CreateProfileHelper();
105 scoped_ptr<session_manager::SessionManager> session_manager_;
107 bool created_profile_helper_;
108 scoped_ptr<chromeos::ProfileHelper> profile_helper_;
110 scoped_ptr<chromeos::OomPriorityManager> oom_priority_manager_;
112 scoped_ptr<chromeos::system::AutomaticRebootManager>
113 automatic_reboot_manager_;
115 scoped_ptr<chromeos::ChromeUserManager> chrome_user_manager_;
117 scoped_ptr<chromeos::system::DeviceDisablingManagerDefaultDelegate>
118 device_disabling_manager_delegate_;
119 scoped_ptr<chromeos::system::DeviceDisablingManager>
120 device_disabling_manager_;
122 scoped_ptr<chromeos::TimeZoneResolver> timezone_resolver_;
124 DISALLOW_COPY_AND_ASSIGN(BrowserProcessPlatformPart);
127 #endif // CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_