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