Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / chrome_browser_main_chromeos.h
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
13 namespace contacts {
14 class ContactManager;
15 }
16
17 namespace content {
18 class PowerSaveBlocker;
19 }
20
21 namespace chromeos {
22
23 class DataPromoNotification;
24 class EventRewriter;
25 class ExtensionSystemEventObserver;
26 class IdleActionWarningObserver;
27 class MagnificationManager;
28 class PeripheralBatteryObserver;
29 class PowerButtonObserver;
30 class PowerPrefs;
31 class SessionManagerObserver;
32 class SwapMetrics;
33
34 namespace default_app_order {
35 class ExternalLoader;
36 }
37
38 namespace internal {
39 class DBusServices;
40 }
41
42 class 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_