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 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 19 NaClStartParams::~NaClStartParams() { 20 } 21 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 } 29 30 NaClLaunchParams::NaClLaunchParams(const std::string& manifest_url, 31 int render_view_id, 32 uint32 permission_bits, 33 bool uses_irt, 34 bool enable_dyncode_syscalls, 35 bool enable_exception_handling) 36 : manifest_url(manifest_url), 37 render_view_id(render_view_id), 38 permission_bits(permission_bits), 39 uses_irt(uses_irt), 40 enable_dyncode_syscalls(enable_dyncode_syscalls), 41 enable_exception_handling(enable_exception_handling) { 42 } 43 44 NaClLaunchParams::NaClLaunchParams(const NaClLaunchParams& l) { 45 manifest_url = l.manifest_url; 46 render_view_id = l.render_view_id; 47 permission_bits = l.permission_bits; 48 uses_irt = l.uses_irt; 49 enable_dyncode_syscalls = l.enable_dyncode_syscalls; 50 enable_exception_handling = l.enable_exception_handling; 51 } 52 53 NaClLaunchParams::~NaClLaunchParams() { 54 } 55 56 NaClLaunchResult::NaClLaunchResult() 57 : imc_channel_handle(IPC::InvalidPlatformFileForTransit()), 58 ipc_channel_handle(), 59 plugin_pid(base::kNullProcessId), 60 plugin_child_id(0) { 61 } 62 63 NaClLaunchResult::NaClLaunchResult( 64 FileDescriptor imc_channel_handle, 65 const IPC::ChannelHandle& ipc_channel_handle, 66 base::ProcessId plugin_pid, 67 int plugin_child_id) 68 : imc_channel_handle(imc_channel_handle), 69 ipc_channel_handle(ipc_channel_handle), 70 plugin_pid(plugin_pid), 71 plugin_child_id(plugin_child_id) { 72 } 73 74 NaClLaunchResult::~NaClLaunchResult() { 75 } 76 77 } // namespace nacl 78