| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
| 6 #define CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 6 #define CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/browser/browser_process_sub_thread.h" | 10 #include "content/browser/browser_process_sub_thread.h" |
| 11 | 11 |
| 12 class CommandLine; | 12 class CommandLine; |
| 13 class HighResolutionTimerManager; | 13 class HighResolutionTimerManager; |
| 14 | 14 |
| 15 namespace base { | 15 namespace base { |
| 16 class MessageLoop; | 16 class MessageLoop; |
| 17 class PowerMonitor; | 17 class PowerMonitor; |
| 18 class SystemMonitor; | 18 class SystemMonitor; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace media { | 21 namespace media { |
| 22 class AudioManager; | 22 class AudioManager; |
| 23 class MIDIManager; | |
| 24 } | 23 } |
| 25 | 24 |
| 26 namespace net { | 25 namespace net { |
| 27 class NetworkChangeNotifier; | 26 class NetworkChangeNotifier; |
| 28 } | 27 } |
| 29 | 28 |
| 30 namespace content { | 29 namespace content { |
| 31 class AudioMirroringManager; | 30 class AudioMirroringManager; |
| 32 class BrowserMainParts; | 31 class BrowserMainParts; |
| 33 class BrowserOnlineStateObserver; | 32 class BrowserOnlineStateObserver; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 74 |
| 76 int GetResultCode() const { return result_code_; } | 75 int GetResultCode() const { return result_code_; } |
| 77 | 76 |
| 78 media::AudioManager* audio_manager() const { return audio_manager_.get(); } | 77 media::AudioManager* audio_manager() const { return audio_manager_.get(); } |
| 79 AudioMirroringManager* audio_mirroring_manager() const { | 78 AudioMirroringManager* audio_mirroring_manager() const { |
| 80 return audio_mirroring_manager_.get(); | 79 return audio_mirroring_manager_.get(); |
| 81 } | 80 } |
| 82 MediaStreamManager* media_stream_manager() const { | 81 MediaStreamManager* media_stream_manager() const { |
| 83 return media_stream_manager_.get(); | 82 return media_stream_manager_.get(); |
| 84 } | 83 } |
| 85 media::MIDIManager* midi_manager() const { return midi_manager_.get(); } | |
| 86 | 84 |
| 87 private: | 85 private: |
| 88 class MemoryObserver; | 86 class MemoryObserver; |
| 89 // For ShutdownThreadsAndCleanUp. | 87 // For ShutdownThreadsAndCleanUp. |
| 90 friend class BrowserShutdownImpl; | 88 friend class BrowserShutdownImpl; |
| 91 | 89 |
| 92 void InitializeMainThread(); | 90 void InitializeMainThread(); |
| 93 | 91 |
| 94 // Called right after the browser threads have been started. | 92 // Called right after the browser threads have been started. |
| 95 void BrowserThreadsStarted(); | 93 void BrowserThreadsStarted(); |
| 96 | 94 |
| 97 void MainMessageLoopRun(); | 95 void MainMessageLoopRun(); |
| 98 | 96 |
| 99 // Members initialized on construction --------------------------------------- | 97 // Members initialized on construction --------------------------------------- |
| 100 const MainFunctionParams& parameters_; | 98 const MainFunctionParams& parameters_; |
| 101 const CommandLine& parsed_command_line_; | 99 const CommandLine& parsed_command_line_; |
| 102 int result_code_; | 100 int result_code_; |
| 103 | 101 |
| 104 // Members initialized in |MainMessageLoopStart()| --------------------------- | 102 // Members initialized in |MainMessageLoopStart()| --------------------------- |
| 105 scoped_ptr<base::MessageLoop> main_message_loop_; | 103 scoped_ptr<base::MessageLoop> main_message_loop_; |
| 106 scoped_ptr<base::SystemMonitor> system_monitor_; | 104 scoped_ptr<base::SystemMonitor> system_monitor_; |
| 107 scoped_ptr<base::PowerMonitor> power_monitor_; | 105 scoped_ptr<base::PowerMonitor> power_monitor_; |
| 108 scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_; | 106 scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_; |
| 109 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; | 107 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; |
| 110 scoped_ptr<media::AudioManager> audio_manager_; | 108 scoped_ptr<media::AudioManager> audio_manager_; |
| 111 scoped_ptr<media::MIDIManager> midi_manager_; | |
| 112 scoped_ptr<AudioMirroringManager> audio_mirroring_manager_; | 109 scoped_ptr<AudioMirroringManager> audio_mirroring_manager_; |
| 113 scoped_ptr<MediaStreamManager> media_stream_manager_; | 110 scoped_ptr<MediaStreamManager> media_stream_manager_; |
| 114 // Per-process listener for online state changes. | 111 // Per-process listener for online state changes. |
| 115 scoped_ptr<BrowserOnlineStateObserver> online_state_observer_; | 112 scoped_ptr<BrowserOnlineStateObserver> online_state_observer_; |
| 116 #if defined(OS_WIN) | 113 #if defined(OS_WIN) |
| 117 scoped_ptr<SystemMessageWindowWin> system_message_window_; | 114 scoped_ptr<SystemMessageWindowWin> system_message_window_; |
| 118 #elif defined(OS_LINUX) | 115 #elif defined(OS_LINUX) |
| 119 scoped_ptr<DeviceMonitorLinux> device_monitor_linux_; | 116 scoped_ptr<DeviceMonitorLinux> device_monitor_linux_; |
| 120 #elif defined(OS_MACOSX) && !defined(OS_IOS) | 117 #elif defined(OS_MACOSX) && !defined(OS_IOS) |
| 121 scoped_ptr<DeviceMonitorMac> device_monitor_mac_; | 118 scoped_ptr<DeviceMonitorMac> device_monitor_mac_; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 144 scoped_ptr<BrowserProcessSubThread> cache_thread_; | 141 scoped_ptr<BrowserProcessSubThread> cache_thread_; |
| 145 scoped_ptr<BrowserProcessSubThread> io_thread_; | 142 scoped_ptr<BrowserProcessSubThread> io_thread_; |
| 146 scoped_ptr<MemoryObserver> memory_observer_; | 143 scoped_ptr<MemoryObserver> memory_observer_; |
| 147 | 144 |
| 148 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); | 145 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); |
| 149 }; | 146 }; |
| 150 | 147 |
| 151 } // namespace content | 148 } // namespace content |
| 152 | 149 |
| 153 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 150 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
| OLD | NEW |