Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: content/browser/browser_main_loop.h

Issue 1806313003: Pass task runners to AudioManager constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments from patch 48 Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/audio_modem/audio_recorder_unittest.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <memory> 8 #include <memory>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/timer/timer.h" 13 #include "base/timer/timer.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "content/browser/browser_process_sub_thread.h" 15 #include "content/browser/browser_process_sub_thread.h"
16 #include "content/public/browser/browser_main_runner.h" 16 #include "content/public/browser/browser_main_runner.h"
17 #include "media/audio/audio_manager.h"
17 18
18 #if defined(USE_AURA) 19 #if defined(USE_AURA)
19 namespace aura { 20 namespace aura {
20 class Env; 21 class Env;
21 } 22 }
22 #endif 23 #endif
23 24
24 namespace base { 25 namespace base {
25 class CommandLine; 26 class CommandLine;
26 class FilePath; 27 class FilePath;
27 class HighResolutionTimerManager; 28 class HighResolutionTimerManager;
28 class MessageLoop; 29 class MessageLoop;
29 class PowerMonitor; 30 class PowerMonitor;
30 class SystemMonitor; 31 class SystemMonitor;
31 class MemoryPressureMonitor; 32 class MemoryPressureMonitor;
32 namespace trace_event { 33 namespace trace_event {
33 class TraceEventSystemStatsMonitor; 34 class TraceEventSystemStatsMonitor;
34 } // namespace trace_event 35 } // namespace trace_event
35 } // namespace base 36 } // namespace base
36 37
37 namespace IPC { 38 namespace IPC {
38 class ScopedIPCSupport; 39 class ScopedIPCSupport;
39 } 40 }
40 41
41 namespace media { 42 namespace media {
42 class AudioManager;
43 #if defined(OS_WIN) 43 #if defined(OS_WIN)
44 class SystemMessageWindowWin; 44 class SystemMessageWindowWin;
45 #elif defined(OS_LINUX) && defined(USE_UDEV) 45 #elif defined(OS_LINUX) && defined(USE_UDEV)
46 class DeviceMonitorLinux; 46 class DeviceMonitorLinux;
47 #endif 47 #endif
48 class UserInputMonitor; 48 class UserInputMonitor;
49 #if defined(OS_MACOSX) 49 #if defined(OS_MACOSX)
50 class DeviceMonitorMac; 50 class DeviceMonitorMac;
51 #endif 51 #endif
52 namespace midi { 52 namespace midi {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 162
163 int PreMainMessageLoopRun(); 163 int PreMainMessageLoopRun();
164 164
165 void MainMessageLoopRun(); 165 void MainMessageLoopRun();
166 166
167 base::FilePath GetStartupTraceFileName( 167 base::FilePath GetStartupTraceFileName(
168 const base::CommandLine& command_line) const; 168 const base::CommandLine& command_line) const;
169 void InitStartupTracingForDuration(const base::CommandLine& command_line); 169 void InitStartupTracingForDuration(const base::CommandLine& command_line);
170 void EndStartupTracing(); 170 void EndStartupTracing();
171 171
172 void CreateAudioManager();
172 bool UsingInProcessGpu() const; 173 bool UsingInProcessGpu() const;
173 174
174 // Quick reference for initialization order: 175 // Quick reference for initialization order:
175 // Constructor 176 // Constructor
176 // Init() 177 // Init()
177 // EarlyInitialization() 178 // EarlyInitialization()
178 // InitializeToolkit() 179 // InitializeToolkit()
179 // PreMainMessageLoopStart() 180 // PreMainMessageLoopStart()
180 // MainMessageLoopStart() 181 // MainMessageLoopStart()
181 // InitializeMainThread() 182 // InitializeMainThread()
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 std::unique_ptr<BrowserProcessSubThread> cache_thread_; 254 std::unique_ptr<BrowserProcessSubThread> cache_thread_;
254 std::unique_ptr<BrowserProcessSubThread> io_thread_; 255 std::unique_ptr<BrowserProcessSubThread> io_thread_;
255 256
256 // Members initialized in |BrowserThreadsStarted()| -------------------------- 257 // Members initialized in |BrowserThreadsStarted()| --------------------------
257 std::unique_ptr<base::Thread> indexed_db_thread_; 258 std::unique_ptr<base::Thread> indexed_db_thread_;
258 std::unique_ptr<MojoShellContext> mojo_shell_context_; 259 std::unique_ptr<MojoShellContext> mojo_shell_context_;
259 std::unique_ptr<IPC::ScopedIPCSupport> mojo_ipc_support_; 260 std::unique_ptr<IPC::ScopedIPCSupport> mojo_ipc_support_;
260 261
261 // |user_input_monitor_| has to outlive |audio_manager_|, so declared first. 262 // |user_input_monitor_| has to outlive |audio_manager_|, so declared first.
262 std::unique_ptr<media::UserInputMonitor> user_input_monitor_; 263 std::unique_ptr<media::UserInputMonitor> user_input_monitor_;
263 std::unique_ptr<media::AudioManager> audio_manager_; 264 // AudioThread needs to outlive |audio_manager_|.
265 std::unique_ptr<base::Thread> audio_thread_;
266 media::ScopedAudioManagerPtr audio_manager_;
264 267
265 std::unique_ptr<media::midi::MidiManager> midi_manager_; 268 std::unique_ptr<media::midi::MidiManager> midi_manager_;
266 269
267 #if defined(OS_WIN) 270 #if defined(OS_WIN)
268 std::unique_ptr<media::SystemMessageWindowWin> system_message_window_; 271 std::unique_ptr<media::SystemMessageWindowWin> system_message_window_;
269 #elif defined(OS_LINUX) && defined(USE_UDEV) 272 #elif defined(OS_LINUX) && defined(USE_UDEV)
270 std::unique_ptr<media::DeviceMonitorLinux> device_monitor_linux_; 273 std::unique_ptr<media::DeviceMonitorLinux> device_monitor_linux_;
271 #elif defined(OS_MACOSX) && !defined(OS_IOS) 274 #elif defined(OS_MACOSX) && !defined(OS_IOS)
272 std::unique_ptr<media::DeviceMonitorMac> device_monitor_mac_; 275 std::unique_ptr<media::DeviceMonitorMac> device_monitor_mac_;
273 #endif 276 #endif
274 #if defined(USE_OZONE) 277 #if defined(USE_OZONE)
275 std::unique_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_; 278 std::unique_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_;
276 #endif 279 #endif
277 280
278 std::unique_ptr<ResourceDispatcherHostImpl> resource_dispatcher_host_; 281 std::unique_ptr<ResourceDispatcherHostImpl> resource_dispatcher_host_;
279 std::unique_ptr<MediaStreamManager> media_stream_manager_; 282 std::unique_ptr<MediaStreamManager> media_stream_manager_;
280 std::unique_ptr<SpeechRecognitionManagerImpl> speech_recognition_manager_; 283 std::unique_ptr<SpeechRecognitionManagerImpl> speech_recognition_manager_;
281 std::unique_ptr<TimeZoneMonitor> time_zone_monitor_; 284 std::unique_ptr<TimeZoneMonitor> time_zone_monitor_;
282 285
283 // DO NOT add members here. Add them to the right categories above. 286 // DO NOT add members here. Add them to the right categories above.
284 287
285 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); 288 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop);
286 }; 289 };
287 290
288 } // namespace content 291 } // namespace content
289 292
290 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ 293 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_
OLDNEW
« no previous file with comments | « components/audio_modem/audio_recorder_unittest.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698