1 // Copyright 2013 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 #include "components/nacl/common/nacl_types.h"
6 #include "ipc/ipc_platform_file.h"
7
8 namespace nacl {
9
NaClStartParams()10 NaClStartParams::NaClStartParams()
11 : validation_cache_enabled(false),
12 enable_exception_handling(false),
13 enable_debug_stub(false),
14 enable_ipc_proxy(false),
15 uses_irt(false),
16 enable_dyncode_syscalls(false) {
17 }
18
~NaClStartParams()19 NaClStartParams::~NaClStartParams() {
20 }
21
NaClLaunchParams()22 NaClLaunchParams::NaClLaunchParams()
23 : render_view_id(0),
24 permission_bits(0),
25 uses_irt(false),
26 enable_dyncode_syscalls(false),
27 enable_exception_handling(false),
28 enable_crash_throttling(false) {
29 }
30
NaClLaunchParams(const std::string & manifest_url,int render_view_id,uint32 permission_bits,bool uses_irt,bool uses_nonsfi_mode,bool enable_dyncode_syscalls,bool enable_exception_handling,bool enable_crash_throttling)31 NaClLaunchParams::NaClLaunchParams(const std::string& manifest_url,
32 int render_view_id,
33 uint32 permission_bits,
34 bool uses_irt,
35 bool uses_nonsfi_mode,
36 bool enable_dyncode_syscalls,
37 bool enable_exception_handling,
38 bool enable_crash_throttling)
39 : manifest_url(manifest_url),
40 render_view_id(render_view_id),
41 permission_bits(permission_bits),
42 uses_irt(uses_irt),
43 uses_nonsfi_mode(uses_nonsfi_mode),
44 enable_dyncode_syscalls(enable_dyncode_syscalls),
45 enable_exception_handling(enable_exception_handling),
46 enable_crash_throttling(enable_crash_throttling) {
47 }
48
NaClLaunchParams(const NaClLaunchParams & l)49 NaClLaunchParams::NaClLaunchParams(const NaClLaunchParams& l) {
50 manifest_url = l.manifest_url;
51 render_view_id = l.render_view_id;
52 permission_bits = l.permission_bits;
53 uses_irt = l.uses_irt;
54 uses_nonsfi_mode = l.uses_nonsfi_mode;
55 enable_dyncode_syscalls = l.enable_dyncode_syscalls;
56 enable_exception_handling = l.enable_exception_handling;
57 enable_crash_throttling = l.enable_crash_throttling;
58 }
59
~NaClLaunchParams()60 NaClLaunchParams::~NaClLaunchParams() {
61 }
62
NaClLaunchResult()63 NaClLaunchResult::NaClLaunchResult()
64 : imc_channel_handle(IPC::InvalidPlatformFileForTransit()),
65 ppapi_ipc_channel_handle(),
66 trusted_ipc_channel_handle(),
67 plugin_pid(base::kNullProcessId),
68 plugin_child_id(0) {
69 }
70
NaClLaunchResult(FileDescriptor imc_channel_handle,const IPC::ChannelHandle & ppapi_ipc_channel_handle,const IPC::ChannelHandle & trusted_ipc_channel_handle,const IPC::ChannelHandle & manifest_service_ipc_channel_handle,base::ProcessId plugin_pid,int plugin_child_id)71 NaClLaunchResult::NaClLaunchResult(
72 FileDescriptor imc_channel_handle,
73 const IPC::ChannelHandle& ppapi_ipc_channel_handle,
74 const IPC::ChannelHandle& trusted_ipc_channel_handle,
75 const IPC::ChannelHandle& manifest_service_ipc_channel_handle,
76 base::ProcessId plugin_pid,
77 int plugin_child_id)
78 : imc_channel_handle(imc_channel_handle),
79 ppapi_ipc_channel_handle(ppapi_ipc_channel_handle),
80 trusted_ipc_channel_handle(trusted_ipc_channel_handle),
81 manifest_service_ipc_channel_handle(manifest_service_ipc_channel_handle),
82 plugin_pid(plugin_pid),
83 plugin_child_id(plugin_child_id) {
84 }
85
~NaClLaunchResult()86 NaClLaunchResult::~NaClLaunchResult() {
87 }
88
89 } // namespace nacl
90