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 : nexe_file(IPC::InvalidPlatformFileForTransit()),
14 validation_cache_enabled(false),
15 enable_exception_handling(false),
16 enable_debug_stub(false),
17 enable_ipc_proxy(false),
19 enable_dyncode_syscalls(false) {
22 NaClStartParams::~NaClStartParams() {
25 NaClLaunchParams::NaClLaunchParams()
26 : nexe_file(IPC::InvalidPlatformFileForTransit()),
32 enable_dyncode_syscalls(false),
33 enable_exception_handling(false),
34 enable_crash_throttling(false) {
37 NaClLaunchParams::NaClLaunchParams(
38 const std::string& manifest_url,
39 const IPC::PlatformFileForTransit& nexe_file,
40 uint64_t nexe_token_lo,
41 uint64_t nexe_token_hi,
43 uint32 permission_bits,
45 bool uses_nonsfi_mode,
46 bool enable_dyncode_syscalls,
47 bool enable_exception_handling,
48 bool enable_crash_throttling)
49 : manifest_url(manifest_url),
51 nexe_token_lo(nexe_token_lo),
52 nexe_token_hi(nexe_token_hi),
53 render_view_id(render_view_id),
54 permission_bits(permission_bits),
56 uses_nonsfi_mode(uses_nonsfi_mode),
57 enable_dyncode_syscalls(enable_dyncode_syscalls),
58 enable_exception_handling(enable_exception_handling),
59 enable_crash_throttling(enable_crash_throttling) {
62 NaClLaunchParams::~NaClLaunchParams() {
65 NaClLaunchResult::NaClLaunchResult()
66 : imc_channel_handle(IPC::InvalidPlatformFileForTransit()),
67 ppapi_ipc_channel_handle(),
68 trusted_ipc_channel_handle(),
69 plugin_pid(base::kNullProcessId),
73 NaClLaunchResult::NaClLaunchResult(
74 FileDescriptor imc_channel_handle,
75 const IPC::ChannelHandle& ppapi_ipc_channel_handle,
76 const IPC::ChannelHandle& trusted_ipc_channel_handle,
77 const IPC::ChannelHandle& manifest_service_ipc_channel_handle,
78 base::ProcessId plugin_pid,
80 : imc_channel_handle(imc_channel_handle),
81 ppapi_ipc_channel_handle(ppapi_ipc_channel_handle),
82 trusted_ipc_channel_handle(trusted_ipc_channel_handle),
83 manifest_service_ipc_channel_handle(manifest_service_ipc_channel_handle),
84 plugin_pid(plugin_pid),
85 plugin_child_id(plugin_child_id) {
88 NaClLaunchResult::~NaClLaunchResult() {