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

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

Issue 9297022: Change ChildProcess::set_main_thread registration to occur inside the RenderThreadImpl::Init method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 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 | « content/test/render_view_fake_resources_test.cc ('k') | no next file » | 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 #include "content/test/webrtc_audio_device_test.h" 5 #include "content/test/webrtc_audio_device_test.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // Construct the resource context on the UI thread. 115 // Construct the resource context on the UI thread.
116 resource_context_.reset(new WebRTCMockResourceContext()); 116 resource_context_.reset(new WebRTCMockResourceContext());
117 117
118 static const char kThreadName[] = "RenderThread"; 118 static const char kThreadName[] = "RenderThread";
119 ChildProcess::current()->io_message_loop()->PostTask(FROM_HERE, 119 ChildProcess::current()->io_message_loop()->PostTask(FROM_HERE,
120 base::Bind(&WebRTCAudioDeviceTest::InitializeIOThread, 120 base::Bind(&WebRTCAudioDeviceTest::InitializeIOThread,
121 base::Unretained(this), kThreadName)); 121 base::Unretained(this), kThreadName));
122 WaitForIOThreadCompletion(); 122 WaitForIOThreadCompletion();
123 123
124 render_thread_ = new RenderThreadImpl(kThreadName); 124 render_thread_ = new RenderThreadImpl(kThreadName);
125 mock_process_->set_main_thread(render_thread_);
126 } 125 }
127 126
128 void WebRTCAudioDeviceTest::TearDown() { 127 void WebRTCAudioDeviceTest::TearDown() {
129 SetAudioUtilCallback(NULL); 128 SetAudioUtilCallback(NULL);
130 129
131 // Kick of the cleanup process by closing the channel. This queues up 130 // Kick of the cleanup process by closing the channel. This queues up
132 // OnStreamClosed calls to be executed on the audio thread. 131 // OnStreamClosed calls to be executed on the audio thread.
133 ChildProcess::current()->io_message_loop()->PostTask(FROM_HERE, 132 ChildProcess::current()->io_message_loop()->PostTask(FROM_HERE,
134 base::Bind(&WebRTCAudioDeviceTest::DestroyChannel, 133 base::Bind(&WebRTCAudioDeviceTest::DestroyChannel,
135 base::Unretained(this))); 134 base::Unretained(this)));
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 WebRTCTransportImpl::~WebRTCTransportImpl() {} 328 WebRTCTransportImpl::~WebRTCTransportImpl() {}
330 329
331 int WebRTCTransportImpl::SendPacket(int channel, const void* data, int len) { 330 int WebRTCTransportImpl::SendPacket(int channel, const void* data, int len) {
332 return network_->ReceivedRTPPacket(channel, data, len); 331 return network_->ReceivedRTPPacket(channel, data, len);
333 } 332 }
334 333
335 int WebRTCTransportImpl::SendRTCPPacket(int channel, const void* data, 334 int WebRTCTransportImpl::SendRTCPPacket(int channel, const void* data,
336 int len) { 335 int len) {
337 return network_->ReceivedRTCPPacket(channel, data, len); 336 return network_->ReceivedRTCPPacket(channel, data, len);
338 } 337 }
OLDNEW
« no previous file with comments | « content/test/render_view_fake_resources_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698