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

Side by Side Diff: content/test/webrtc_audio_device_test.h

Issue 9255017: Add thread safety to AudioManagerBase to protect access to the audio thread member variable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix style issue Created 8 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/test/webrtc_audio_device_test.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ 5 #ifndef CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_
6 #define CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ 6 #define CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 void OnGetHardwareSampleRate(double* sample_rate); 138 void OnGetHardwareSampleRate(double* sample_rate);
139 void OnGetHardwareInputSampleRate(double* sample_rate); 139 void OnGetHardwareInputSampleRate(double* sample_rate);
140 140
141 // IPC::Channel::Listener implementation. 141 // IPC::Channel::Listener implementation.
142 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 142 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
143 143
144 // Posts a final task to the IO message loop and waits for completion. 144 // Posts a final task to the IO message loop and waits for completion.
145 void WaitForIOThreadCompletion(); 145 void WaitForIOThreadCompletion();
146 void WaitForAudioManagerCompletion(); 146 void WaitForAudioManagerCompletion();
147 void WaitForMessageLoopCompletion(MessageLoop* loop); 147 void WaitForMessageLoopCompletion(base::MessageLoopProxy* loop);
148 148
149 // Convenience getter for gmock. 149 // Convenience getter for gmock.
150 MockMediaObserver& media_observer() const { 150 MockMediaObserver& media_observer() const {
151 return *media_observer_.get(); 151 return *media_observer_.get();
152 } 152 }
153 153
154 std::string GetTestDataPath(const FilePath::StringType& file_name); 154 std::string GetTestDataPath(const FilePath::StringType& file_name);
155 155
156 scoped_ptr<ReplaceContentClientRenderer> saved_content_renderer_; 156 scoped_ptr<ReplaceContentClientRenderer> saved_content_renderer_;
157 MessageLoopForUI message_loop_; 157 MessageLoopForUI message_loop_;
(...skipping 28 matching lines...) Expand all
186 virtual ~WebRTCTransportImpl(); 186 virtual ~WebRTCTransportImpl();
187 187
188 virtual int SendPacket(int channel, const void* data, int len) OVERRIDE; 188 virtual int SendPacket(int channel, const void* data, int len) OVERRIDE;
189 virtual int SendRTCPPacket(int channel, const void* data, int len) OVERRIDE; 189 virtual int SendRTCPPacket(int channel, const void* data, int len) OVERRIDE;
190 190
191 private: 191 private:
192 webrtc::VoENetwork* network_; 192 webrtc::VoENetwork* network_;
193 }; 193 };
194 194
195 #endif // CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ 195 #endif // CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_
OLDNEW
« no previous file with comments | « no previous file | content/test/webrtc_audio_device_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698