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

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

Issue 66183002: Replace MessageLoopProxy with SingleThreadTaskRunner for the rest of media/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win and audio tests Created 6 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
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_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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/message_loop/message_loop.h"
14 #include "content/browser/renderer_host/media/mock_media_observer.h" 13 #include "content/browser/renderer_host/media/mock_media_observer.h"
15 #include "content/public/renderer/content_renderer_client.h" 14 #include "content/public/renderer/content_renderer_client.h"
16 #include "ipc/ipc_listener.h" 15 #include "ipc/ipc_listener.h"
17 #include "media/base/audio_hardware_config.h" 16 #include "media/base/audio_hardware_config.h"
18 #include "media/base/channel_layout.h" 17 #include "media/base/channel_layout.h"
19 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
20 #include "third_party/webrtc/common_types.h" 19 #include "third_party/webrtc/common_types.h"
21 20
22 namespace IPC { 21 namespace IPC {
23 class Channel; 22 class Channel;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 143
145 void OnGetAudioHardwareConfig(media::AudioParameters* input_params, 144 void OnGetAudioHardwareConfig(media::AudioParameters* input_params,
146 media::AudioParameters* output_params); 145 media::AudioParameters* output_params);
147 146
148 // IPC::Listener implementation. 147 // IPC::Listener implementation.
149 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 148 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
150 149
151 // Posts a final task to the IO message loop and waits for completion. 150 // Posts a final task to the IO message loop and waits for completion.
152 void WaitForIOThreadCompletion(); 151 void WaitForIOThreadCompletion();
153 void WaitForAudioManagerCompletion(); 152 void WaitForAudioManagerCompletion();
154 void WaitForMessageLoopCompletion(base::MessageLoopProxy* loop); 153 void WaitForTaskRunnerCompletion(
154 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
155 155
156 std::string GetTestDataPath(const base::FilePath::StringType& file_name); 156 std::string GetTestDataPath(const base::FilePath::StringType& file_name);
157 157
158 scoped_ptr<ReplaceContentClientRenderer> saved_content_renderer_; 158 scoped_ptr<ReplaceContentClientRenderer> saved_content_renderer_;
159 base::MessageLoopForUI message_loop_; 159 base::MessageLoopForUI message_loop_;
160 ContentRendererClient content_renderer_client_; 160 ContentRendererClient content_renderer_client_;
161 RenderThreadImpl* render_thread_; // Owned by mock_process_. 161 RenderThreadImpl* render_thread_; // Owned by mock_process_.
162 scoped_ptr<WebRTCMockRenderProcess> mock_process_; 162 scoped_ptr<WebRTCMockRenderProcess> mock_process_;
163 scoped_ptr<MediaStreamManager> media_stream_manager_; 163 scoped_ptr<MediaStreamManager> media_stream_manager_;
164 scoped_ptr<media::AudioManager> audio_manager_; 164 scoped_ptr<media::AudioManager> audio_manager_;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 virtual int SendPacket(int channel, const void* data, int len) OVERRIDE; 201 virtual int SendPacket(int channel, const void* data, int len) OVERRIDE;
202 virtual int SendRTCPPacket(int channel, const void* data, int len) OVERRIDE; 202 virtual int SendRTCPPacket(int channel, const void* data, int len) OVERRIDE;
203 203
204 private: 204 private:
205 webrtc::VoENetwork* network_; 205 webrtc::VoENetwork* network_;
206 }; 206 };
207 207
208 } // namespace content 208 } // namespace content
209 209
210 #endif // CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_ 210 #endif // CONTENT_TEST_WEBRTC_AUDIO_DEVICE_TEST_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | content/test/webrtc_audio_device_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698