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.
5 #include "components/nacl/common/nacl_types.h"
6 #include "ipc/ipc_platform_file.h"
10 NaClStartParams::NaClStartParams()
11 : validation_cache_enabled(false),
12 enable_exception_handling(false),
13 enable_debug_stub(false),
14 enable_ipc_proxy(false),
16 enable_dyncode_syscalls(false) {
19 NaClStartParams::~NaClStartParams() {
22 NaClLaunchParams::NaClLaunchParams()
26 enable_dyncode_syscalls(false),
27 enable_exception_handling(false),
28 enable_crash_throttling(false) {
31 NaClLaunchParams::NaClLaunchParams(const std::string
& manifest_url
,
33 uint32 permission_bits
,
35 bool enable_dyncode_syscalls
,
36 bool enable_exception_handling
,
37 bool enable_crash_throttling
)
38 : manifest_url(manifest_url
),
39 render_view_id(render_view_id
),
40 permission_bits(permission_bits
),
42 enable_dyncode_syscalls(enable_dyncode_syscalls
),
43 enable_exception_handling(enable_exception_handling
),
44 enable_crash_throttling(enable_crash_throttling
) {
47 NaClLaunchParams::NaClLaunchParams(const NaClLaunchParams
& l
) {
48 manifest_url
= l
.manifest_url
;
49 render_view_id
= l
.render_view_id
;
50 permission_bits
= l
.permission_bits
;
51 uses_irt
= l
.uses_irt
;
52 enable_dyncode_syscalls
= l
.enable_dyncode_syscalls
;
53 enable_exception_handling
= l
.enable_exception_handling
;
54 enable_crash_throttling
= l
.enable_crash_throttling
;
57 NaClLaunchParams::~NaClLaunchParams() {
60 NaClLaunchResult::NaClLaunchResult()
61 : imc_channel_handle(IPC::InvalidPlatformFileForTransit()),
63 plugin_pid(base::kNullProcessId
),
67 NaClLaunchResult::NaClLaunchResult(
68 FileDescriptor imc_channel_handle
,
69 const IPC::ChannelHandle
& ipc_channel_handle
,
70 base::ProcessId plugin_pid
,
72 : imc_channel_handle(imc_channel_handle
),
73 ipc_channel_handle(ipc_channel_handle
),
74 plugin_pid(plugin_pid
),
75 plugin_child_id(plugin_child_id
) {
78 NaClLaunchResult::~NaClLaunchResult() {