chrome_browser_main_chromeos.h revision 5d1f7b1de12d16ceb2c938c56701a3e8bfa558f7
1// Copyright (c) 2012 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.
4
5#ifndef CHROME_BROWSER_CHROMEOS_CHROME_BROWSER_MAIN_CHROMEOS_H_
6#define CHROME_BROWSER_CHROMEOS_CHROME_BROWSER_MAIN_CHROMEOS_H_
7
8#include "base/memory/scoped_ptr.h"
9#include "base/task/cancelable_task_tracker.h"
10#include "chrome/browser/chrome_browser_main_linux.h"
11#include "chrome/browser/chromeos/version_loader.h"
12
13namespace contacts {
14class ContactManager;
15}
16
17namespace content {
18class PowerSaveBlocker;
19}
20
21namespace chromeos {
22
23class DataPromoNotification;
24class EventRewriter;
25class ExtensionSystemEventObserver;
26class IdleActionWarningObserver;
27class MagnificationManager;
28class PeripheralBatteryObserver;
29class PowerButtonObserver;
30class PowerPrefs;
31class SessionManagerObserver;
32class SwapMetrics;
33
34namespace default_app_order {
35class ExternalLoader;
36}
37
38namespace internal {
39class DBusServices;
40}
41
42class ChromeBrowserMainPartsChromeos : public ChromeBrowserMainPartsLinux {
43 public:
44  explicit ChromeBrowserMainPartsChromeos(
45      const content::MainFunctionParams& parameters);
46  virtual ~ChromeBrowserMainPartsChromeos();
47
48  // ChromeBrowserMainParts overrides.
49  virtual void PreEarlyInitialization() OVERRIDE;
50  virtual void PreMainMessageLoopStart() OVERRIDE;
51  virtual void PostMainMessageLoopStart() OVERRIDE;
52  virtual void PreMainMessageLoopRun() OVERRIDE;
53
54  // Stages called from PreMainMessageLoopRun.
55  virtual void PreProfileInit() OVERRIDE;
56  virtual void PostProfileInit() OVERRIDE;
57  virtual void PreBrowserStart() OVERRIDE;
58  virtual void PostBrowserStart() OVERRIDE;
59
60  virtual void PostMainMessageLoopRun() OVERRIDE;
61  virtual void PostDestroyThreads() OVERRIDE;
62
63 private:
64  scoped_ptr<contacts::ContactManager> contact_manager_;
65  scoped_ptr<default_app_order::ExternalLoader> app_order_loader_;
66  scoped_ptr<ExtensionSystemEventObserver> extension_system_event_observer_;
67  scoped_ptr<PeripheralBatteryObserver> peripheral_battery_observer_;
68  scoped_ptr<PowerPrefs> power_prefs_;
69  scoped_ptr<PowerButtonObserver> power_button_observer_;
70  scoped_ptr<content::PowerSaveBlocker> retail_mode_power_save_blocker_;
71  scoped_ptr<IdleActionWarningObserver> idle_action_warning_observer_;
72  scoped_ptr<DataPromoNotification> data_promo_notification_;
73
74  scoped_ptr<internal::DBusServices> dbus_services_;
75  scoped_ptr<EventRewriter> event_rewriter_;
76
77  VersionLoader cros_version_loader_;
78  base::CancelableTaskTracker tracker_;
79  bool use_new_network_change_notifier_;
80
81  DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsChromeos);
82};
83
84}  // namespace chromeos
85
86#endif  // CHROME_BROWSER_CHROMEOS_CHROME_BROWSER_MAIN_CHROMEOS_H_
87