Chromium Code Reviews| Index: components/mus/common/gpu_type_converters.cc |
| diff --git a/components/mus/common/gpu_type_converters.cc b/components/mus/common/gpu_type_converters.cc |
| index 7733c7d3bf7e5d51ebd95afcdba9d865ae18541c..4a2615e1654a65c8a08a38e0926788dc97c336ea 100644 |
| --- a/components/mus/common/gpu_type_converters.cc |
| +++ b/components/mus/common/gpu_type_converters.cc |
| @@ -31,6 +31,7 @@ TypeConverter<mus::mojom::ChannelHandlePtr, IPC::ChannelHandle>::Convert( |
| if (platform_file != -1) |
| result->socket = mojo::WrapPlatformFile(platform_file); |
| #endif |
| + result->mojo_handle.reset(handle.mojo_handle); |
|
dcheng
2016/07/01 01:31:43
It's hard for me to tell where the type converter
Anand Mistry (off Chromium)
2016/07/01 05:52:54
So, I'm making this change in prep for switching G
dcheng
2016/07/04 07:11:59
Fair enough, I've filed a followup bug and assign
Peng
2016/07/06 15:19:06
I think when GPU starts using ChannelMojo, we coul
|
| return result; |
| } |
| @@ -40,6 +41,11 @@ TypeConverter<IPC::ChannelHandle, mus::mojom::ChannelHandlePtr>::Convert( |
| const mus::mojom::ChannelHandlePtr& handle) { |
| if (handle.is_null()) |
| return IPC::ChannelHandle(); |
| + if (handle->mojo_handle.is_valid()) { |
| + IPC::ChannelHandle channel_handle(handle->mojo_handle.release()); |
| + channel_handle.name = handle->name; |
| + return channel_handle; |
| + } |
| #if defined(OS_WIN) |
| // On windows, a pipe handle Will NOT be marshalled over IPC. |
| DCHECK(!handle->socket.is_valid()); |