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

Unified Diff: services/ui/common/gpu_type_converters.cc

Issue 2109593006: Add ChannelHandle::mojo_handle to mus' ChannelHandle mojom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase update. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | services/ui/common/gpu_type_converters_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/common/gpu_type_converters.cc
diff --git a/services/ui/common/gpu_type_converters.cc b/services/ui/common/gpu_type_converters.cc
index a09b9590d8a421233043923d4031f8858e3fe5de..9ee911a594b39d3d7a417822e56ebb62635573f2 100644
--- a/services/ui/common/gpu_type_converters.cc
+++ b/services/ui/common/gpu_type_converters.cc
@@ -31,6 +31,7 @@ TypeConverter<ui::mojom::ChannelHandlePtr, IPC::ChannelHandle>::Convert(
if (platform_file != -1)
result->socket = mojo::WrapPlatformFile(platform_file);
#endif
+ result->mojo_handle.reset(handle.mojo_handle);
return result;
}
@@ -40,6 +41,11 @@ TypeConverter<IPC::ChannelHandle, ui::mojom::ChannelHandlePtr>::Convert(
const ui::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());
« no previous file with comments | « no previous file | services/ui/common/gpu_type_converters_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698