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

Side by Side Diff: chrome/common/nacl_types.h

Issue 7395024: For Linux, create a ZygoteForkDelegate that uses the nacl_helper executable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A zygote fork delegate for Native Client Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // Handle passing definitions for NaCl 5 // Handle passing definitions for NaCl
6 #ifndef CHROME_COMMON_NACL_TYPES_H_ 6 #ifndef CHROME_COMMON_NACL_TYPES_H_
7 #define CHROME_COMMON_NACL_TYPES_H_ 7 #define CHROME_COMMON_NACL_TYPES_H_
8 #pragma once 8 #pragma once
9 9
10 #include "base/native_library.h" // for HANDLE and OS_POSIX
agl 2011/07/18 21:19:35 I think this should be removed. Unless the types a
Brad Chen 2011/07/18 22:40:29 Just to double check: given that HANDLE and OS_POS
agl 2011/07/18 22:56:35 #include "build/build_config.h" for OS_* defines.
Brad Chen 2011/07/18 23:05:48 Done.
10 #if defined(OS_POSIX) 11 #if defined(OS_POSIX)
11 #include "base/file_descriptor_posix.h" 12 #include "base/file_descriptor_posix.h"
12 #endif 13 #endif
13 14
14 // TODO(gregoryd): add a Windows definition for base::FileDescriptor 15 // TODO(gregoryd): add a Windows definition for base::FileDescriptor
15 namespace nacl { 16 namespace nacl {
16 #if defined(OS_WIN) 17 #if defined(OS_WIN)
17 // We assume that HANDLE always uses less than 32 bits 18 // We assume that HANDLE always uses less than 32 bits
18 typedef int FileDescriptor; 19 typedef int FileDescriptor;
19 inline HANDLE ToNativeHandle(const FileDescriptor& desc) { 20 inline HANDLE ToNativeHandle(const FileDescriptor& desc) {
20 return reinterpret_cast<HANDLE>(desc); 21 return reinterpret_cast<HANDLE>(desc);
21 } 22 }
22 #elif defined(OS_POSIX) 23 #endif
agl 2011/07/18 21:19:35 I don't believe that we have any platforms where O
Brad Chen 2011/07/18 22:40:29 Done.
24 #if defined(OS_POSIX)
23 typedef base::FileDescriptor FileDescriptor; 25 typedef base::FileDescriptor FileDescriptor;
24 inline int ToNativeHandle(const FileDescriptor& desc) { 26 inline int ToNativeHandle(const FileDescriptor& desc) {
25 return desc.fd; 27 return desc.fd;
26 } 28 }
27 #endif 29 #endif
28 } 30 }
29 31
30 #endif // CHROME_COMMON_NACL_TYPES_H_ 32 #endif // CHROME_COMMON_NACL_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698