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

Side by Side Diff: media/audio/audio_manager.h

Issue 2077983003: Intiialize AudioManager and related class lazily (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix MediaSessionTest Created 4 years, 5 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 | « media/audio/android/audio_manager_android.cc ('k') | media/audio/audio_manager.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 MEDIA_AUDIO_AUDIO_MANAGER_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_H_
6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_ 6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 // A convenience wrapper of AudioManager::Create for testing. 68 // A convenience wrapper of AudioManager::Create for testing.
69 // The given |task_runner| is shared for both audio io and heavyweight tasks. 69 // The given |task_runner| is shared for both audio io and heavyweight tasks.
70 static ScopedAudioManagerPtr CreateForTesting( 70 static ScopedAudioManagerPtr CreateForTesting(
71 scoped_refptr<base::SingleThreadTaskRunner> task_runner); 71 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
72 72
73 // Starts monitoring AudioManager task runner for hangs. 73 // Starts monitoring AudioManager task runner for hangs.
74 // Runs the monitor on the given |task_runner|, which must be different from 74 // Runs the monitor on the given |task_runner|, which must be different from
75 // AudioManager::GetTaskRunner to be meaningful. 75 // AudioManager::GetTaskRunner to be meaningful.
76 // This must be called only after an AudioManager instance is created. 76 // This must be called only after an AudioManager instance is created.
77 static void StartHangMonitor( 77 static void StartHangMonitorIfNeeded(
78 scoped_refptr<base::SingleThreadTaskRunner> task_runner); 78 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
79 79
80 // Enables non-crash dumps when audio thread hangs are detected. 80 // Enables non-crash dumps when audio thread hangs are detected.
81 // TODO(dalecurtis): There are no callers to this function at present. A list 81 // TODO(dalecurtis): There are no callers to this function at present. A list
82 // of bad drivers has been given to Microsoft. This should be re-enabled in 82 // of bad drivers has been given to Microsoft. This should be re-enabled in
83 // the future if Microsoft is able to triage third party drivers. 83 // the future if Microsoft is able to triage third party drivers.
84 // See http://crbug.com/422522 84 // See http://crbug.com/422522
85 static void EnableCrashKeyLoggingForAudioThreadHangs(); 85 static void EnableCrashKeyLoggingForAudioThreadHangs();
86 86
87 #if defined(OS_LINUX) 87 #if defined(OS_LINUX)
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 friend class base::DeleteHelper<AudioManager>; 255 friend class base::DeleteHelper<AudioManager>;
256 256
257 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 257 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
258 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner_; 258 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner_;
259 DISALLOW_COPY_AND_ASSIGN(AudioManager); 259 DISALLOW_COPY_AND_ASSIGN(AudioManager);
260 }; 260 };
261 261
262 } // namespace media 262 } // namespace media
263 263
264 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ 264 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_
OLDNEW
« no previous file with comments | « media/audio/android/audio_manager_android.cc ('k') | media/audio/audio_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698