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 "chrome/browser/chrome_browser_main_linux.h" 10 #include "chrome/browser/chromeos/version_loader.h" 11 #include "chrome/common/cancelable_task_tracker.h" 12 13 namespace contacts { 14 class ContactManager; 15 } 16 17 namespace content { 18 class PowerSaveBlocker; 19 } 20 21 namespace chromeos { 22 23 class BrightnessObserver; 24 class DisplayConfigurationObserver; 25 class IdleActionWarningObserver; 26 class MagnificationManager; 27 class PeripheralBatteryObserver; 28 class PowerButtonObserver; 29 class PowerPrefs; 30 class ResumeObserver; 31 class ScreenLockObserver; 32 class ScreensaverController; 33 class SessionManagerObserver; 34 class SuspendObserver; 35 class SwapMetrics; 36 class UserActivityNotifier; 37 class VideoActivityNotifier; 38 39 namespace default_app_order { 40 class ExternalLoader; 41 } 42 43 namespace internal { 44 class DBusServices; 45 } 46 47 class ChromeBrowserMainPartsChromeos : public ChromeBrowserMainPartsLinux { 48 public: 49 explicit ChromeBrowserMainPartsChromeos( 50 const content::MainFunctionParams& parameters); 51 virtual ~ChromeBrowserMainPartsChromeos(); 52 53 // ChromeBrowserMainParts overrides. 54 virtual void PreEarlyInitialization() OVERRIDE; 55 virtual void PreMainMessageLoopStart() OVERRIDE; 56 virtual void PostMainMessageLoopStart() OVERRIDE; 57 virtual void PreMainMessageLoopRun() OVERRIDE; 58 59 // Stages called from PreMainMessageLoopRun. 60 virtual void PreProfileInit() OVERRIDE; 61 virtual void PostProfileInit() OVERRIDE; 62 virtual void PreBrowserStart() OVERRIDE; 63 virtual void PostBrowserStart() OVERRIDE; 64 65 virtual void PostMainMessageLoopRun() OVERRIDE; 66 virtual void PostDestroyThreads() OVERRIDE; 67 68 virtual void SetupPlatformFieldTrials() OVERRIDE; 69 70 private: 71 scoped_ptr<contacts::ContactManager> contact_manager_; 72 scoped_ptr<BrightnessObserver> brightness_observer_; 73 scoped_ptr<DisplayConfigurationObserver> display_configuration_observer_; 74 scoped_ptr<default_app_order::ExternalLoader> app_order_loader_; 75 scoped_ptr<SuspendObserver> suspend_observer_; 76 scoped_ptr<ResumeObserver> resume_observer_; 77 scoped_ptr<ScreenLockObserver> screen_lock_observer_; 78 scoped_ptr<ScreensaverController> screensaver_controller_; 79 scoped_ptr<PeripheralBatteryObserver> peripheral_battery_observer_; 80 scoped_ptr<PowerPrefs> power_prefs_; 81 scoped_ptr<PowerButtonObserver> power_button_observer_; 82 scoped_ptr<content::PowerSaveBlocker> retail_mode_power_save_blocker_; 83 scoped_ptr<UserActivityNotifier> user_activity_notifier_; 84 scoped_ptr<VideoActivityNotifier> video_activity_notifier_; 85 scoped_ptr<IdleActionWarningObserver> idle_action_warning_observer_; 86 scoped_ptr<SwapMetrics> swap_metrics_; 87 88 scoped_ptr<internal::DBusServices> dbus_services_; 89 90 VersionLoader cros_version_loader_; 91 CancelableTaskTracker tracker_; 92 bool use_new_network_change_notifier_; 93 94 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsChromeos); 95 }; 96 97 } // namespace chromeos 98 99 #endif // CHROME_BROWSER_CHROMEOS_CHROME_BROWSER_MAIN_CHROMEOS_H_ 100