OLD | NEW |
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 #if defined(OS_WIN) | 5 #if defined(OS_WIN) |
6 #include <windows.h> | 6 #include <windows.h> |
7 #endif | 7 #endif |
8 | 8 |
9 #include "content/common/gpu/gpu_channel.h" | 9 #include "content/common/gpu/gpu_channel.h" |
10 | 10 |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 host_id, route_id)); | 296 host_id, route_id)); |
297 router_.AddRoute(route_id, transport.get()); | 297 router_.AddRoute(route_id, transport.get()); |
298 transport_textures_.AddWithID(transport.release(), route_id); | 298 transport_textures_.AddWithID(transport.release(), route_id); |
299 | 299 |
300 IPC::Message* msg = new GpuTransportTextureHostMsg_TransportTextureCreated( | 300 IPC::Message* msg = new GpuTransportTextureHostMsg_TransportTextureCreated( |
301 host_id, route_id); | 301 host_id, route_id); |
302 Send(msg); | 302 Send(msg); |
303 #endif | 303 #endif |
304 } | 304 } |
305 | 305 |
306 bool GpuChannel::Init(MessageLoop* io_message_loop, | 306 bool GpuChannel::Init(base::MessageLoopProxy* io_message_loop, |
307 base::WaitableEvent* shutdown_event) { | 307 base::WaitableEvent* shutdown_event) { |
308 // Check whether we're already initialized. | 308 // Check whether we're already initialized. |
309 if (channel_.get()) | 309 if (channel_.get()) |
310 return true; | 310 return true; |
311 | 311 |
312 // Map renderer ID to a (single) channel to that process. | 312 // Map renderer ID to a (single) channel to that process. |
313 std::string channel_name = GetChannelName(); | 313 std::string channel_name = GetChannelName(); |
314 channel_.reset(new IPC::SyncChannel( | 314 channel_.reset(new IPC::SyncChannel( |
315 channel_name, | 315 channel_name, |
316 IPC::Channel::MODE_SERVER, | 316 IPC::Channel::MODE_SERVER, |
(...skipping 11 matching lines...) Expand all Loading... |
328 | 328 |
329 #if defined(OS_POSIX) | 329 #if defined(OS_POSIX) |
330 int GpuChannel::GetRendererFileDescriptor() { | 330 int GpuChannel::GetRendererFileDescriptor() { |
331 int fd = -1; | 331 int fd = -1; |
332 if (channel_.get()) { | 332 if (channel_.get()) { |
333 fd = channel_->GetClientFileDescriptor(); | 333 fd = channel_->GetClientFileDescriptor(); |
334 } | 334 } |
335 return fd; | 335 return fd; |
336 } | 336 } |
337 #endif // defined(OS_POSIX) | 337 #endif // defined(OS_POSIX) |
OLD | NEW |