| 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/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "content/browser/browser_process_sub_thread.h" | 11 #include "content/browser/browser_process_sub_thread.h" |
| 12 #include "content/public/browser/browser_main_runner.h" | 12 #include "content/public/browser/browser_main_runner.h" |
| 13 | 13 |
| 14 class CommandLine; | 14 class CommandLine; |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class HighResolutionTimerManager; | 17 class HighResolutionTimerManager; |
| 18 class MessageLoop; | 18 class MessageLoop; |
| 19 class PowerMonitor; | 19 class PowerMonitor; |
| 20 class SystemMonitor; | 20 class SystemMonitor; |
| 21 namespace debug { | 21 namespace debug { |
| 22 class TraceMemoryController; | 22 class TraceMemoryController; |
| 23 } // namespace debug | 23 } // namespace debug |
| 24 } // namespace base | 24 } // namespace base |
| 25 | 25 |
| 26 namespace media { | 26 namespace media { |
| 27 class AudioManager; | 27 class AudioManager; |
| 28 class MIDIManager; | 28 class MIDIManager; |
| 29 class UserInputMonitor; |
| 29 } // namespace media | 30 } // namespace media |
| 30 | 31 |
| 31 namespace net { | 32 namespace net { |
| 32 class NetworkChangeNotifier; | 33 class NetworkChangeNotifier; |
| 33 } // namespace net | 34 } // namespace net |
| 34 | 35 |
| 35 namespace content { | 36 namespace content { |
| 36 class AudioMirroringManager; | 37 class AudioMirroringManager; |
| 37 class BrowserMainParts; | 38 class BrowserMainParts; |
| 38 class BrowserOnlineStateObserver; | 39 class BrowserOnlineStateObserver; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 80 |
| 80 int GetResultCode() const { return result_code_; } | 81 int GetResultCode() const { return result_code_; } |
| 81 | 82 |
| 82 media::AudioManager* audio_manager() const { return audio_manager_.get(); } | 83 media::AudioManager* audio_manager() const { return audio_manager_.get(); } |
| 83 AudioMirroringManager* audio_mirroring_manager() const { | 84 AudioMirroringManager* audio_mirroring_manager() const { |
| 84 return audio_mirroring_manager_.get(); | 85 return audio_mirroring_manager_.get(); |
| 85 } | 86 } |
| 86 MediaStreamManager* media_stream_manager() const { | 87 MediaStreamManager* media_stream_manager() const { |
| 87 return media_stream_manager_.get(); | 88 return media_stream_manager_.get(); |
| 88 } | 89 } |
| 90 media::UserInputMonitor* user_input_monitor() const { |
| 91 return user_input_monitor_.get(); |
| 92 } |
| 89 media::MIDIManager* midi_manager() const { return midi_manager_.get(); } | 93 media::MIDIManager* midi_manager() const { return midi_manager_.get(); } |
| 90 base::Thread* indexed_db_thread() const { return indexed_db_thread_.get(); } | 94 base::Thread* indexed_db_thread() const { return indexed_db_thread_.get(); } |
| 91 | 95 |
| 92 private: | 96 private: |
| 93 class MemoryObserver; | 97 class MemoryObserver; |
| 94 // For ShutdownThreadsAndCleanUp. | 98 // For ShutdownThreadsAndCleanUp. |
| 95 friend class BrowserShutdownImpl; | 99 friend class BrowserShutdownImpl; |
| 96 | 100 |
| 97 void InitializeMainThread(); | 101 void InitializeMainThread(); |
| 98 | 102 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 115 int result_code_; | 119 int result_code_; |
| 116 // True if the non-UI threads were created. | 120 // True if the non-UI threads were created. |
| 117 bool created_threads_; | 121 bool created_threads_; |
| 118 | 122 |
| 119 // Members initialized in |MainMessageLoopStart()| --------------------------- | 123 // Members initialized in |MainMessageLoopStart()| --------------------------- |
| 120 scoped_ptr<base::MessageLoop> main_message_loop_; | 124 scoped_ptr<base::MessageLoop> main_message_loop_; |
| 121 scoped_ptr<base::SystemMonitor> system_monitor_; | 125 scoped_ptr<base::SystemMonitor> system_monitor_; |
| 122 scoped_ptr<base::PowerMonitor> power_monitor_; | 126 scoped_ptr<base::PowerMonitor> power_monitor_; |
| 123 scoped_ptr<base::HighResolutionTimerManager> hi_res_timer_manager_; | 127 scoped_ptr<base::HighResolutionTimerManager> hi_res_timer_manager_; |
| 124 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; | 128 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; |
| 129 // user_input_monitor_ has to outlive audio_manager_, so declared first. |
| 130 scoped_ptr<media::UserInputMonitor> user_input_monitor_; |
| 125 scoped_ptr<media::AudioManager> audio_manager_; | 131 scoped_ptr<media::AudioManager> audio_manager_; |
| 126 scoped_ptr<media::MIDIManager> midi_manager_; | 132 scoped_ptr<media::MIDIManager> midi_manager_; |
| 127 scoped_ptr<AudioMirroringManager> audio_mirroring_manager_; | 133 scoped_ptr<AudioMirroringManager> audio_mirroring_manager_; |
| 128 scoped_ptr<MediaStreamManager> media_stream_manager_; | 134 scoped_ptr<MediaStreamManager> media_stream_manager_; |
| 129 // Per-process listener for online state changes. | 135 // Per-process listener for online state changes. |
| 130 scoped_ptr<BrowserOnlineStateObserver> online_state_observer_; | 136 scoped_ptr<BrowserOnlineStateObserver> online_state_observer_; |
| 131 #if defined(OS_WIN) | 137 #if defined(OS_WIN) |
| 132 scoped_ptr<SystemMessageWindowWin> system_message_window_; | 138 scoped_ptr<SystemMessageWindowWin> system_message_window_; |
| 133 #elif defined(OS_LINUX) | 139 #elif defined(OS_LINUX) |
| 134 scoped_ptr<DeviceMonitorLinux> device_monitor_linux_; | 140 scoped_ptr<DeviceMonitorLinux> device_monitor_linux_; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 158 scoped_ptr<base::Thread> indexed_db_thread_; | 164 scoped_ptr<base::Thread> indexed_db_thread_; |
| 159 scoped_ptr<MemoryObserver> memory_observer_; | 165 scoped_ptr<MemoryObserver> memory_observer_; |
| 160 scoped_ptr<base::debug::TraceMemoryController> trace_memory_controller_; | 166 scoped_ptr<base::debug::TraceMemoryController> trace_memory_controller_; |
| 161 | 167 |
| 162 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); | 168 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); |
| 163 }; | 169 }; |
| 164 | 170 |
| 165 } // namespace content | 171 } // namespace content |
| 166 | 172 |
| 167 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 173 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
| OLD | NEW |