• 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 session_manager {
19 class SessionManager;
20 }
21 
22 namespace chromeos {
23 
24 class DataPromoNotification;
25 class EventRewriter;
26 class EventRewriterController;
27 class ExtensionSystemEventObserver;
28 class IdleActionWarningObserver;
29 class LightBar;
30 class MagnificationManager;
31 class PeripheralBatteryObserver;
32 class PowerButtonObserver;
33 class PowerPrefs;
34 class RendererFreezer;
35 class SessionManagerObserver;
36 class SwapMetrics;
37 
38 namespace default_app_order {
39 class ExternalLoader;
40 }
41 
42 namespace internal {
43 class DBusServices;
44 }
45 
46 class ChromeBrowserMainPartsChromeos : public ChromeBrowserMainPartsLinux {
47  public:
48   explicit ChromeBrowserMainPartsChromeos(
49       const content::MainFunctionParams& parameters);
50   virtual ~ChromeBrowserMainPartsChromeos();
51 
52   // ChromeBrowserMainParts overrides.
53   virtual void PreEarlyInitialization() OVERRIDE;
54   virtual void PreMainMessageLoopStart() OVERRIDE;
55   virtual void PostMainMessageLoopStart() OVERRIDE;
56   virtual void PreMainMessageLoopRun() OVERRIDE;
57 
58   // Stages called from PreMainMessageLoopRun.
59   virtual void PreProfileInit() OVERRIDE;
60   virtual void PostProfileInit() OVERRIDE;
61   virtual void PreBrowserStart() OVERRIDE;
62   virtual void PostBrowserStart() OVERRIDE;
63 
64   virtual void PostMainMessageLoopRun() OVERRIDE;
65   virtual void PostDestroyThreads() OVERRIDE;
66 
67  private:
68   scoped_ptr<default_app_order::ExternalLoader> app_order_loader_;
69   scoped_ptr<ExtensionSystemEventObserver> extension_system_event_observer_;
70   scoped_ptr<PeripheralBatteryObserver> peripheral_battery_observer_;
71   scoped_ptr<PowerPrefs> power_prefs_;
72   scoped_ptr<PowerButtonObserver> power_button_observer_;
73   scoped_ptr<content::PowerSaveBlocker> retail_mode_power_save_blocker_;
74   scoped_ptr<IdleActionWarningObserver> idle_action_warning_observer_;
75   scoped_ptr<DataPromoNotification> data_promo_notification_;
76   scoped_ptr<RendererFreezer> renderer_freezer_;
77   scoped_ptr<LightBar> light_bar_;
78 
79   scoped_ptr<internal::DBusServices> dbus_services_;
80 
81   scoped_ptr<session_manager::SessionManager> session_manager_;
82 
83   scoped_ptr<EventRewriterController> keyboard_event_rewriters_;
84 
85   scoped_refptr<chromeos::ExternalMetrics> external_metrics_;
86 
87   VersionLoader cros_version_loader_;
88   base::CancelableTaskTracker tracker_;
89   bool use_new_network_change_notifier_;
90 
91   DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsChromeos);
92 };
93 
94 }  // namespace chromeos
95 
96 #endif  // CHROME_BROWSER_CHROMEOS_CHROME_BROWSER_MAIN_CHROMEOS_H_
97