chrome_browser_main_chromeos.h revision 5c02ac1a9c1b504631c0a3d2b6e737b5d738bae1
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 content {
14class PowerSaveBlocker;
15}
16
17namespace chromeos {
18
19class DataPromoNotification;
20class EventRewriter;
21class EventRewriterController;
22class ExtensionSystemEventObserver;
23class IdleActionWarningObserver;
24class MagnificationManager;
25class PeripheralBatteryObserver;
26class PowerButtonObserver;
27class PowerPrefs;
28class SessionManagerObserver;
29class SwapMetrics;
30
31namespace default_app_order {
32class ExternalLoader;
33}
34
35namespace internal {
36class DBusServices;
37}
38
39class ChromeBrowserMainPartsChromeos : public ChromeBrowserMainPartsLinux {
40 public:
41  explicit ChromeBrowserMainPartsChromeos(
42      const content::MainFunctionParams& parameters);
43  virtual ~ChromeBrowserMainPartsChromeos();
44
45  // ChromeBrowserMainParts overrides.
46  virtual void PreEarlyInitialization() OVERRIDE;
47  virtual void PreMainMessageLoopStart() OVERRIDE;
48  virtual void PostMainMessageLoopStart() OVERRIDE;
49  virtual void PreMainMessageLoopRun() OVERRIDE;
50
51  // Stages called from PreMainMessageLoopRun.
52  virtual void PreProfileInit() OVERRIDE;
53  virtual void PostProfileInit() OVERRIDE;
54  virtual void PreBrowserStart() OVERRIDE;
55  virtual void PostBrowserStart() OVERRIDE;
56
57  virtual void PostMainMessageLoopRun() OVERRIDE;
58  virtual void PostDestroyThreads() OVERRIDE;
59
60 private:
61  scoped_ptr<default_app_order::ExternalLoader> app_order_loader_;
62  scoped_ptr<ExtensionSystemEventObserver> extension_system_event_observer_;
63  scoped_ptr<PeripheralBatteryObserver> peripheral_battery_observer_;
64  scoped_ptr<PowerPrefs> power_prefs_;
65  scoped_ptr<PowerButtonObserver> power_button_observer_;
66  scoped_ptr<content::PowerSaveBlocker> retail_mode_power_save_blocker_;
67  scoped_ptr<IdleActionWarningObserver> idle_action_warning_observer_;
68  scoped_ptr<DataPromoNotification> data_promo_notification_;
69
70  scoped_ptr<internal::DBusServices> dbus_services_;
71
72#if defined(USE_X11)
73  scoped_ptr<EventRewriter> event_rewriter_;
74#endif
75  scoped_ptr<EventRewriterController> keyboard_event_rewriters_;
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