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

Unified Diff: ipc/ipc_channel_handle.h

Issue 2301103003: Use ChannelMojo for NaCl PPAPI channels. (Closed)
Patch Set: Created 4 years, 2 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 | « ipc/ipc_channel_common.cc ('k') | ppapi/nacl_irt/plugin_startup.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_handle.h
diff --git a/ipc/ipc_channel_handle.h b/ipc/ipc_channel_handle.h
index 2e9dc3e57f37f424934ac1a7f832763d1f2a80f1..8a344fd392124574174e847af0e097ac1c18041a 100644
--- a/ipc/ipc_channel_handle.h
+++ b/ipc/ipc_channel_handle.h
@@ -50,6 +50,17 @@ struct ChannelHandle {
#endif // defined(OS_POSIX)
ChannelHandle(mojo::MessagePipeHandle h) : mojo_handle(h) {}
+ bool is_mojo_channel_handle() const {
+#if defined(OS_WIN)
+ if (pipe.handle)
+ return false;
+#elif defined(OS_POSIX)
+ if (socket.fd != -1)
+ return false;
+#endif // defined(OS_POSIX)
+ return mojo_handle.is_valid() && name.empty();
+ }
+
std::string name;
#if defined(OS_POSIX)
base::FileDescriptor socket;
« no previous file with comments | « ipc/ipc_channel_common.cc ('k') | ppapi/nacl_irt/plugin_startup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698