| OLD | NEW |
| 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/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 return NULL; | 1210 return NULL; |
| 1211 } | 1211 } |
| 1212 | 1212 |
| 1213 GetContentClient()->SetGpuInfo(gpu_info); | 1213 GetContentClient()->SetGpuInfo(gpu_info); |
| 1214 | 1214 |
| 1215 // Cache some variables that are needed on the compositor thread for our | 1215 // Cache some variables that are needed on the compositor thread for our |
| 1216 // implementation of GpuChannelHostFactory. | 1216 // implementation of GpuChannelHostFactory. |
| 1217 io_message_loop_proxy_ = ChildProcess::current()->io_message_loop_proxy(); | 1217 io_message_loop_proxy_ = ChildProcess::current()->io_message_loop_proxy(); |
| 1218 shutdown_event_ = ChildProcess::current()->GetShutDownEvent(); | 1218 shutdown_event_ = ChildProcess::current()->GetShutDownEvent(); |
| 1219 | 1219 |
| 1220 gpu_channel_ = GpuChannelHost::Create( | 1220 gpu_channel_ = GpuChannelHost::Create(this, gpu_info, channel_handle); |
| 1221 this, 0, gpu_info, channel_handle); | |
| 1222 return gpu_channel_.get(); | 1221 return gpu_channel_.get(); |
| 1223 } | 1222 } |
| 1224 | 1223 |
| 1225 blink::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter( | 1224 blink::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter( |
| 1226 blink::WebMediaStreamCenterClient* client) { | 1225 blink::WebMediaStreamCenterClient* client) { |
| 1227 #if defined(OS_ANDROID) | 1226 #if defined(OS_ANDROID) |
| 1228 if (CommandLine::ForCurrentProcess()->HasSwitch( | 1227 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 1229 switches::kDisableWebRTC)) | 1228 switches::kDisableWebRTC)) |
| 1230 return NULL; | 1229 return NULL; |
| 1231 #endif | 1230 #endif |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1369 if (!gamepad_shared_memory_reader_) | 1368 if (!gamepad_shared_memory_reader_) |
| 1370 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader); | 1369 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader); |
| 1371 gamepad_shared_memory_reader_->SampleGamepads(*data); | 1370 gamepad_shared_memory_reader_->SampleGamepads(*data); |
| 1372 } | 1371 } |
| 1373 | 1372 |
| 1374 base::ProcessId RenderThreadImpl::renderer_process_id() const { | 1373 base::ProcessId RenderThreadImpl::renderer_process_id() const { |
| 1375 return renderer_process_id_; | 1374 return renderer_process_id_; |
| 1376 } | 1375 } |
| 1377 | 1376 |
| 1378 } // namespace content | 1377 } // namespace content |
| OLD | NEW |