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

Unified Diff: media/audio/audio_device_thread.h

Issue 2038053002: Change audio render thread checking to use new AudioRendererSink::BelongsToRendererThread() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix. Rebase. Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: media/audio/audio_device_thread.h
diff --git a/media/audio/audio_device_thread.h b/media/audio/audio_device_thread.h
index 61e5e8724ddc24b289c01c364e3491b137779462..1ffefc5a29146738e7a3274a2e9b1ef70e0a583a 100644
--- a/media/audio/audio_device_thread.h
+++ b/media/audio/audio_device_thread.h
@@ -12,6 +12,7 @@
#include "base/memory/shared_memory.h"
#include "base/sync_socket.h"
#include "base/synchronization/lock.h"
+#include "base/threading/thread_checker.h"
#include "media/base/audio_parameters.h"
#include "media/base/media_export.h"
@@ -68,6 +69,11 @@ class MEDIA_EXPORT AudioDeviceThread {
const int total_segments_;
int segment_length_;
+ // Detached in constructor and attached in InitializeOnAudioThread() which
+ // is called on the audio device thread. Sub-classes can then use it for
+ // various thread checking purposes.
+ base::ThreadChecker thread_checker_;
+
private:
DISALLOW_COPY_AND_ASSIGN(Callback);
};

Powered by Google App Engine
This is Rietveld 408576698