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

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

Issue 1901583005: Revert of Pass task runners to AudioManager constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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"
18 17
19 #if defined(USE_AURA) 18 #if defined(USE_AURA)
20 namespace aura { 19 namespace aura {
21 class Env; 20 class Env;
22 } 21 }
23 #endif 22 #endif
24 23
25 namespace base { 24 namespace base {
26 class CommandLine; 25 class CommandLine;
27 class FilePath; 26 class FilePath;
28 class HighResolutionTimerManager; 27 class HighResolutionTimerManager;
29 class MessageLoop; 28 class MessageLoop;
30 class PowerMonitor; 29 class PowerMonitor;
31 class SystemMonitor; 30 class SystemMonitor;
32 class MemoryPressureMonitor; 31 class MemoryPressureMonitor;
33 namespace trace_event { 32 namespace trace_event {
34 class TraceEventSystemStatsMonitor; 33 class TraceEventSystemStatsMonitor;
35 } // namespace trace_event 34 } // namespace trace_event
36 } // namespace base 35 } // namespace base
37 36
38 namespace IPC { 37 namespace IPC {
39 class ScopedIPCSupport; 38 class ScopedIPCSupport;
40 } 39 }
41 40
42 namespace media { 41 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();
173 bool UsingInProcessGpu() const; 172 bool UsingInProcessGpu() const;
174 173
175 // Quick reference for initialization order: 174 // Quick reference for initialization order:
176 // Constructor 175 // Constructor
177 // Init() 176 // Init()
178 // EarlyInitialization() 177 // EarlyInitialization()
179 // InitializeToolkit() 178 // InitializeToolkit()
180 // PreMainMessageLoopStart() 179 // PreMainMessageLoopStart()
181 // MainMessageLoopStart() 180 // MainMessageLoopStart()
182 // InitializeMainThread() 181 // InitializeMainThread()
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 std::unique_ptr<BrowserProcessSubThread> cache_thread_; 253 std::unique_ptr<BrowserProcessSubThread> cache_thread_;
255 std::unique_ptr<BrowserProcessSubThread> io_thread_; 254 std::unique_ptr<BrowserProcessSubThread> io_thread_;
256 255
257 // Members initialized in |BrowserThreadsStarted()| -------------------------- 256 // Members initialized in |BrowserThreadsStarted()| --------------------------
258 std::unique_ptr<base::Thread> indexed_db_thread_; 257 std::unique_ptr<base::Thread> indexed_db_thread_;
259 std::unique_ptr<MojoShellContext> mojo_shell_context_; 258 std::unique_ptr<MojoShellContext> mojo_shell_context_;
260 std::unique_ptr<IPC::ScopedIPCSupport> mojo_ipc_support_; 259 std::unique_ptr<IPC::ScopedIPCSupport> mojo_ipc_support_;
261 260
262 // |user_input_monitor_| has to outlive |audio_manager_|, so declared first. 261 // |user_input_monitor_| has to outlive |audio_manager_|, so declared first.
263 std::unique_ptr<media::UserInputMonitor> user_input_monitor_; 262 std::unique_ptr<media::UserInputMonitor> user_input_monitor_;
264 // AudioThread needs to outlive |audio_manager_|. 263 std::unique_ptr<media::AudioManager> audio_manager_;
265 std::unique_ptr<base::Thread> audio_thread_;
266 media::ScopedAudioManagerPtr audio_manager_;
267 264
268 std::unique_ptr<media::midi::MidiManager> midi_manager_; 265 std::unique_ptr<media::midi::MidiManager> midi_manager_;
269 266
270 #if defined(OS_WIN) 267 #if defined(OS_WIN)
271 std::unique_ptr<media::SystemMessageWindowWin> system_message_window_; 268 std::unique_ptr<media::SystemMessageWindowWin> system_message_window_;
272 #elif defined(OS_LINUX) && defined(USE_UDEV) 269 #elif defined(OS_LINUX) && defined(USE_UDEV)
273 std::unique_ptr<media::DeviceMonitorLinux> device_monitor_linux_; 270 std::unique_ptr<media::DeviceMonitorLinux> device_monitor_linux_;
274 #elif defined(OS_MACOSX) && !defined(OS_IOS) 271 #elif defined(OS_MACOSX) && !defined(OS_IOS)
275 std::unique_ptr<media::DeviceMonitorMac> device_monitor_mac_; 272 std::unique_ptr<media::DeviceMonitorMac> device_monitor_mac_;
276 #endif 273 #endif
277 #if defined(USE_OZONE) 274 #if defined(USE_OZONE)
278 std::unique_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_; 275 std::unique_ptr<ui::ClientNativePixmapFactory> client_native_pixmap_factory_;
279 #endif 276 #endif
280 277
281 std::unique_ptr<ResourceDispatcherHostImpl> resource_dispatcher_host_; 278 std::unique_ptr<ResourceDispatcherHostImpl> resource_dispatcher_host_;
282 std::unique_ptr<MediaStreamManager> media_stream_manager_; 279 std::unique_ptr<MediaStreamManager> media_stream_manager_;
283 std::unique_ptr<SpeechRecognitionManagerImpl> speech_recognition_manager_; 280 std::unique_ptr<SpeechRecognitionManagerImpl> speech_recognition_manager_;
284 std::unique_ptr<TimeZoneMonitor> time_zone_monitor_; 281 std::unique_ptr<TimeZoneMonitor> time_zone_monitor_;
285 282
286 // DO NOT add members here. Add them to the right categories above. 283 // DO NOT add members here. Add them to the right categories above.
287 284
288 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); 285 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop);
289 }; 286 };
290 287
291 } // namespace content 288 } // namespace content
292 289
293 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ 290 #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