summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/chrome_browser_main_chromeos.h
blob: 828bd5b0611de11fedad0bbe2e75f841b67ed3c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_CHROMEOS_CHROME_BROWSER_MAIN_CHROMEOS_H_
#define CHROME_BROWSER_CHROMEOS_CHROME_BROWSER_MAIN_CHROMEOS_H_

#include "base/memory/scoped_ptr.h"
#include "base/task/cancelable_task_tracker.h"
#include "chrome/browser/chrome_browser_main_linux.h"
#include "chrome/browser/chromeos/external_metrics.h"
#include "chrome/browser/chromeos/version_loader.h"

namespace content {
class PowerSaveBlocker;
}

namespace session_manager {
class SessionManager;
}

namespace chromeos {

class DataPromoNotification;
class EventRewriter;
class EventRewriterController;
class ExtensionSystemEventObserver;
class IdleActionWarningObserver;
class LightBar;
class MagnificationManager;
class PeripheralBatteryObserver;
class PowerButtonObserver;
class PowerPrefs;
class RendererFreezer;
class SessionManagerObserver;
class SwapMetrics;

namespace default_app_order {
class ExternalLoader;
}

namespace internal {
class DBusServices;
}

class ChromeBrowserMainPartsChromeos : public ChromeBrowserMainPartsLinux {
 public:
  explicit ChromeBrowserMainPartsChromeos(
      const content::MainFunctionParams& parameters);
  virtual ~ChromeBrowserMainPartsChromeos();

  // ChromeBrowserMainParts overrides.
  virtual void PreEarlyInitialization() override;
  virtual void PreMainMessageLoopStart() override;
  virtual void PostMainMessageLoopStart() override;
  virtual void PreMainMessageLoopRun() override;

  // Stages called from PreMainMessageLoopRun.
  virtual void PreProfileInit() override;
  virtual void PostProfileInit() override;
  virtual void PreBrowserStart() override;
  virtual void PostBrowserStart() override;

  virtual void PostMainMessageLoopRun() override;
  virtual void PostDestroyThreads() override;

 private:
  scoped_ptr<default_app_order::ExternalLoader> app_order_loader_;
  scoped_ptr<ExtensionSystemEventObserver> extension_system_event_observer_;
  scoped_ptr<PeripheralBatteryObserver> peripheral_battery_observer_;
  scoped_ptr<PowerPrefs> power_prefs_;
  scoped_ptr<PowerButtonObserver> power_button_observer_;
  scoped_ptr<content::PowerSaveBlocker> retail_mode_power_save_blocker_;
  scoped_ptr<IdleActionWarningObserver> idle_action_warning_observer_;
  scoped_ptr<DataPromoNotification> data_promo_notification_;
  scoped_ptr<RendererFreezer> renderer_freezer_;
  scoped_ptr<LightBar> light_bar_;

  scoped_ptr<internal::DBusServices> dbus_services_;

  scoped_ptr<session_manager::SessionManager> session_manager_;

  scoped_ptr<EventRewriterController> keyboard_event_rewriters_;

  scoped_refptr<chromeos::ExternalMetrics> external_metrics_;

  VersionLoader cros_version_loader_;
  base::CancelableTaskTracker tracker_;
  bool use_new_network_change_notifier_;

  DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsChromeos);
};

}  // namespace chromeos

#endif  // CHROME_BROWSER_CHROMEOS_CHROME_BROWSER_MAIN_CHROMEOS_H_