Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1257)

Side by Side Diff: components/nacl/common/nacl_host_messages.h

Issue 2514323004: Convert NaCl renderer-browser messages to mojo. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/nacl/common/nacl.typemap ('k') | components/nacl/common/nacl_host_messages.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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 // Multiply-included file, no traditional include guard.
6
7 #include <stdint.h>
8
9 #include <string>
10
11 #include "base/process/process.h"
12 #include "build/build_config.h"
13 #include "components/nacl/common/nacl_types.h"
14 #include "components/nacl/common/nacl_types_param_traits.h"
15 #include "components/nacl/common/pnacl_types.h"
16 #include "ipc/ipc_channel_handle.h"
17 #include "ipc/ipc_message_macros.h"
18 #include "ipc/ipc_platform_file.h"
19 #include "url/gurl.h"
20 #include "url/ipc/url_param_traits.h"
21
22 #define IPC_MESSAGE_START NaClHostMsgStart
23
24 IPC_STRUCT_TRAITS_BEGIN(nacl::NaClResourcePrefetchRequest)
25 IPC_STRUCT_TRAITS_MEMBER(file_key)
26 IPC_STRUCT_TRAITS_MEMBER(resource_url)
27 IPC_STRUCT_TRAITS_END()
28
29 IPC_STRUCT_TRAITS_BEGIN(nacl::NaClLaunchParams)
30 IPC_STRUCT_TRAITS_MEMBER(manifest_url)
31 IPC_STRUCT_TRAITS_MEMBER(nexe_file)
32 IPC_STRUCT_TRAITS_MEMBER(nexe_token_lo)
33 IPC_STRUCT_TRAITS_MEMBER(nexe_token_hi)
34 IPC_STRUCT_TRAITS_MEMBER(resource_prefetch_request_list)
35 IPC_STRUCT_TRAITS_MEMBER(render_view_id)
36 IPC_STRUCT_TRAITS_MEMBER(permission_bits)
37 IPC_STRUCT_TRAITS_MEMBER(uses_nonsfi_mode)
38 IPC_STRUCT_TRAITS_MEMBER(process_type)
39 IPC_STRUCT_TRAITS_END()
40
41 IPC_STRUCT_TRAITS_BEGIN(nacl::NaClLaunchResult)
42 IPC_STRUCT_TRAITS_MEMBER(ppapi_ipc_channel_handle)
43 IPC_STRUCT_TRAITS_MEMBER(trusted_ipc_channel_handle)
44 IPC_STRUCT_TRAITS_MEMBER(manifest_service_ipc_channel_handle)
45 IPC_STRUCT_TRAITS_MEMBER(plugin_pid)
46 IPC_STRUCT_TRAITS_MEMBER(plugin_child_id)
47 IPC_STRUCT_TRAITS_MEMBER(crash_info_shmem_handle)
48 IPC_STRUCT_TRAITS_END()
49
50 IPC_STRUCT_TRAITS_BEGIN(nacl::PnaclCacheInfo)
51 IPC_STRUCT_TRAITS_MEMBER(pexe_url)
52 IPC_STRUCT_TRAITS_MEMBER(abi_version)
53 IPC_STRUCT_TRAITS_MEMBER(opt_level)
54 IPC_STRUCT_TRAITS_MEMBER(last_modified)
55 IPC_STRUCT_TRAITS_MEMBER(etag)
56 IPC_STRUCT_TRAITS_MEMBER(has_no_store_header)
57 IPC_STRUCT_TRAITS_MEMBER(use_subzero)
58 IPC_STRUCT_TRAITS_MEMBER(sandbox_isa)
59 IPC_STRUCT_TRAITS_MEMBER(extra_flags)
60 IPC_STRUCT_TRAITS_END()
61
62 // A renderer sends this to the browser process when it wants to start
63 // a new instance of the Native Client process. The browser will launch
64 // the process and return an IPC channel handle. This handle will only
65 // be valid if the NaCl IPC proxy is enabled.
66 IPC_SYNC_MESSAGE_CONTROL1_2(NaClHostMsg_LaunchNaCl,
67 nacl::NaClLaunchParams /* launch_params */,
68 nacl::NaClLaunchResult /* launch_result */,
69 std::string /* error_message */)
70
71 // A renderer sends this to the browser process when it wants to
72 // open a file for from the Pnacl component directory.
73 IPC_SYNC_MESSAGE_CONTROL2_3(NaClHostMsg_GetReadonlyPnaclFD,
74 std::string /* name of requested PNaCl file */,
75 bool /* is_executable */,
76 IPC::PlatformFileForTransit /* output file */,
77 uint64_t /* file_token_lo */,
78 uint64_t /* file_token_hi */)
79
80 // A renderer sends this to the browser process when it wants to
81 // create a temporary file.
82 IPC_SYNC_MESSAGE_CONTROL0_1(NaClHostMsg_NaClCreateTemporaryFile,
83 IPC::PlatformFileForTransit /* out file */)
84
85 // A renderer sends this to the browser to request a file descriptor for
86 // a translated nexe.
87 IPC_MESSAGE_CONTROL3(NaClHostMsg_NexeTempFileRequest,
88 int /* render_view_id */,
89 int /* instance */,
90 nacl::PnaclCacheInfo /* cache info */)
91
92 // The browser replies to a renderer's temp file request with output_file,
93 // which is either a writeable temp file to use for translation, or a
94 // read-only file containing the translated nexe from the cache.
95 IPC_MESSAGE_CONTROL3(NaClViewMsg_NexeTempFileReply,
96 int /* instance */,
97 bool /* is_cache_hit */,
98 IPC::PlatformFileForTransit /* output file */)
99
100 // A renderer sends this to the browser to report that its translation has
101 // finished and its temp file contains the translated nexe.
102 IPC_MESSAGE_CONTROL2(NaClHostMsg_ReportTranslationFinished,
103 int /* instance */,
104 bool /* success */)
105
106 // A renderer sends this to the browser process to report when the client
107 // architecture is not listed in the manifest.
108 IPC_MESSAGE_CONTROL1(NaClHostMsg_MissingArchError,
109 int /* render_view_id */)
110
111 // A renderer sends this to the browser process when it wants to
112 // open a NaCl executable file from an installed application directory.
113 IPC_SYNC_MESSAGE_CONTROL3_3(NaClHostMsg_OpenNaClExecutable,
114 int /* render_view_id */,
115 GURL /* URL of NaCl executable file */,
116 bool /* enable_validation_caching */,
117 IPC::PlatformFileForTransit /* output file */,
118 uint64_t /* file_token_lo */,
119 uint64_t /* file_token_hi */)
120
121 // A renderer sends this to the browser process to determine how many
122 // processors are online.
123 IPC_SYNC_MESSAGE_CONTROL0_1(NaClHostMsg_NaClGetNumProcessors,
124 int /* Number of processors */)
125
126 // A renderer sends this to the browser process to determine if the
127 // NaCl application started from the given NMF URL will be debugged.
128 // If not (filtered out by commandline flags), it sets should_debug to false.
129 IPC_SYNC_MESSAGE_CONTROL1_1(NaClHostMsg_NaClDebugEnabledForURL,
130 GURL /* alleged URL of NMF file */,
131 bool /* should debug */)
OLDNEW
« no previous file with comments | « components/nacl/common/nacl.typemap ('k') | components/nacl/common/nacl_host_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698