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),
17 enable_nonsfi_mode(false) {
20 NaClStartParams::~NaClStartParams() {
23 NaClLaunchParams::NaClLaunchParams()
27 enable_dyncode_syscalls(false),
28 enable_exception_handling(false),
29 enable_crash_throttling(false) {
32 NaClLaunchParams::NaClLaunchParams(const std::string
& manifest_url
,
34 uint32 permission_bits
,
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
),
43 enable_dyncode_syscalls(enable_dyncode_syscalls
),
44 enable_exception_handling(enable_exception_handling
),
45 enable_crash_throttling(enable_crash_throttling
) {
48 NaClLaunchParams::NaClLaunchParams(const NaClLaunchParams
& l
) {
49 manifest_url
= l
.manifest_url
;
50 render_view_id
= l
.render_view_id
;
51 permission_bits
= l
.permission_bits
;
52 uses_irt
= l
.uses_irt
;
53 enable_dyncode_syscalls
= l
.enable_dyncode_syscalls
;
54 enable_exception_handling
= l
.enable_exception_handling
;
55 enable_crash_throttling
= l
.enable_crash_throttling
;
58 NaClLaunchParams::~NaClLaunchParams() {
61 NaClLaunchResult::NaClLaunchResult()
62 : imc_channel_handle(IPC::InvalidPlatformFileForTransit()),
64 plugin_pid(base::kNullProcessId
),
68 NaClLaunchResult::NaClLaunchResult(
69 FileDescriptor imc_channel_handle
,
70 const IPC::ChannelHandle
& ipc_channel_handle
,
71 base::ProcessId plugin_pid
,
73 : imc_channel_handle(imc_channel_handle
),
74 ipc_channel_handle(ipc_channel_handle
),
75 plugin_pid(plugin_pid
),
76 plugin_child_id(plugin_child_id
) {
79 NaClLaunchResult::~NaClLaunchResult() {