Add GCMChannelStatusSyncer to schedule requests and enable/disable GCM
[chromium-blink-merge.git] / chrome / browser / browser_process_platform_part_chromeos.h
blob06e8b64252710aa4158b1a328da65a0276d6eb51
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;
23 namespace chromeos {
24 namespace system {
25 class AutomaticRebootManager;
29 namespace policy {
30 class BrowserPolicyConnector;
31 class BrowserPolicyConnectorChromeOS;
34 namespace session_manager {
35 class SessionManager;
38 class Profile;
40 class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase,
41 public base::NonThreadSafe {
42 public:
43 BrowserProcessPlatformPart();
44 virtual ~BrowserProcessPlatformPart();
46 void InitializeAutomaticRebootManager();
47 void ShutdownAutomaticRebootManager();
49 void InitializeChromeUserManager();
50 void DestroyChromeUserManager();
52 void InitializeSessionManager(const base::CommandLine& parsed_command_line,
53 Profile* profile,
54 bool is_running_test);
55 void ShutdownSessionManager();
57 // Returns the SessionManager instance that is used to initialize and
58 // start user sessions as well as responsible on launching pre-session UI like
59 // out-of-box or login.
60 virtual session_manager::SessionManager* SessionManager();
62 // Returns the out-of-memory priority manager.
63 // Virtual for testing (see TestingBrowserProcessPlatformPart).
64 virtual chromeos::OomPriorityManager* oom_priority_manager();
66 // Returns the ProfileHelper instance that is used to identify
67 // users and their profiles in Chrome OS multi user session.
68 chromeos::ProfileHelper* profile_helper();
70 chromeos::system::AutomaticRebootManager* automatic_reboot_manager() {
71 return automatic_reboot_manager_.get();
74 policy::BrowserPolicyConnectorChromeOS* browser_policy_connector_chromeos();
76 chromeos::ChromeUserManager* user_manager() {
77 return chrome_user_manager_.get();
80 // Overridden from BrowserProcessPlatformPartBase:
81 virtual void StartTearDown() OVERRIDE;
83 virtual scoped_ptr<policy::BrowserPolicyConnector>
84 CreateBrowserPolicyConnector() OVERRIDE;
86 private:
87 void CreateProfileHelper();
89 scoped_ptr<session_manager::SessionManager> session_manager_;
91 bool created_profile_helper_;
92 scoped_ptr<chromeos::ProfileHelper> profile_helper_;
94 scoped_ptr<chromeos::OomPriorityManager> oom_priority_manager_;
96 scoped_ptr<chromeos::system::AutomaticRebootManager>
97 automatic_reboot_manager_;
99 scoped_ptr<chromeos::ChromeUserManager> chrome_user_manager_;
101 DISALLOW_COPY_AND_ASSIGN(BrowserProcessPlatformPart);
104 #endif // CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_