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

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

Issue 16881004: Move chrome/nacl to components/nacl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Create a zygote folder Created 7 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
« no previous file with comments | « chrome/common/nacl_paths.cc ('k') | chrome/common/nacl_types.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
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 CHROME_COMMON_NACL_TYPES_H_
6 #define CHROME_COMMON_NACL_TYPES_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/basictypes.h"
12 #include "build/build_config.h"
13
14 #if defined(OS_POSIX)
15 #include "base/file_descriptor_posix.h"
16 #endif
17
18 #if defined(OS_WIN)
19 #include <windows.h> // for HANDLE
20 #endif
21
22 // TODO(gregoryd): add a Windows definition for base::FileDescriptor
23 namespace nacl {
24
25 #if defined(OS_WIN)
26 // We assume that HANDLE always uses less than 32 bits
27 typedef int FileDescriptor;
28 inline HANDLE ToNativeHandle(const FileDescriptor& desc) {
29 return reinterpret_cast<HANDLE>(desc);
30 }
31 #elif defined(OS_POSIX)
32 typedef base::FileDescriptor FileDescriptor;
33 inline int ToNativeHandle(const FileDescriptor& desc) {
34 return desc.fd;
35 }
36 #endif
37
38
39 // Parameters sent to the NaCl process when we start it.
40 //
41 // If you change this, you will also need to update the IPC serialization in
42 // nacl_messages.h.
43 struct NaClStartParams {
44 NaClStartParams();
45 ~NaClStartParams();
46
47 std::vector<FileDescriptor> handles;
48 FileDescriptor debug_stub_server_bound_socket;
49
50 bool validation_cache_enabled;
51 std::string validation_cache_key;
52 // Chrome version string. Sending the version string over IPC avoids linkage
53 // issues in cases where NaCl is not compiled into the main Chromium
54 // executable or DLL.
55 std::string version;
56
57 bool enable_exception_handling;
58 bool enable_debug_stub;
59 bool enable_ipc_proxy;
60 bool uses_irt;
61 bool enable_dyncode_syscalls;
62 };
63
64 // Parameters sent to the browser process to have it launch a NaCl process.
65 //
66 // If you change this, you will also need to update the IPC serialization in
67 // renderer_messages.h.
68 struct NaClLaunchParams {
69 NaClLaunchParams();
70 NaClLaunchParams(const std::string& u, int r, uint32 p, bool uses_irt,
71 bool enable_dyncode_syscalls,
72 bool enable_exception_handling);
73 NaClLaunchParams(const NaClLaunchParams& l);
74 ~NaClLaunchParams();
75
76 std::string manifest_url;
77 int render_view_id;
78 uint32 permission_bits;
79 bool uses_irt;
80 bool enable_dyncode_syscalls;
81 bool enable_exception_handling;
82 };
83
84 } // namespace nacl
85
86 #endif // CHROME_COMMON_NACL_TYPES_H_
OLDNEW
« no previous file with comments | « chrome/common/nacl_paths.cc ('k') | chrome/common/nacl_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698