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

Side by Side Diff: mojo/platform_handle/platform_handle_functions.h

Issue 1578423002: Added PlatformHandle thunks. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
viettrungluu 2016/02/02 00:07:36 This file should also live under //mojo/public/pla
Forrest Reiling 2016/02/10 20:16:08 Done.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MOJO_PLATFORM_HANDLE_PLATFORM_HANDLE_FUNCTIONS_H_
6 #define MOJO_PLATFORM_HANDLE_PLATFORM_HANDLE_FUNCTIONS_H_
7
8 #include "mojo/public/c/system/types.h"
9
10 using MojoPlatformHandle = int; // Unix file descriptor
viettrungluu 2016/02/02 00:07:36 This header should be compilable as C, so you shou
Forrest Reiling 2016/02/10 20:16:08 Done.
11
12 extern "C" {
viettrungluu 2016/02/02 00:07:36 And wrap this line in #ifdef __cplusplus (and ditt
Forrest Reiling 2016/02/10 20:16:09 Done.
13
14 // Wraps |platform_handle| in a MojoHandle so that it can transported, returns
15 // true on success. This takes ownership of |platform_handle|, regardless of
viettrungluu 2016/02/02 00:07:36 It so doesn't return "true".
Forrest Reiling 2016/02/10 20:16:09 Done.
16 // whether this succeeds.
17 MojoResult MojoCreatePlatformHandleWrapper(MojoPlatformHandle platform_handle,
18 MojoHandle* wrapper);
19
20 MojoResult MojoExtractPlatformHandle(MojoHandle wrapper,
viettrungluu 2016/02/02 00:07:36 This could use a comment too.
Forrest Reiling 2016/02/10 20:16:08 Done.
21 MojoPlatformHandle* platform_handle);
22
23 } // extern "C"
24
25 #endif // MOJO_PLATFORM_HANDLE_PLATFORM_HANDLE_FUNCTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698