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

Unified Diff: components/nacl/common/nacl.mojom

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/nacl/common/OWNERS ('k') | components/nacl/common/nacl.typemap » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/common/nacl.mojom
diff --git a/components/nacl/common/nacl.mojom b/components/nacl/common/nacl.mojom
index 70b1286953e948f7caa74074e164d09e8fb437bd..859ed706a7c25bfaa2e313978eef57dacb1c0236 100644
--- a/components/nacl/common/nacl.mojom
+++ b/components/nacl/common/nacl.mojom
@@ -4,9 +4,51 @@
module nacl.mojom;
+import "mojo/common/file.mojom";
+import "url/mojo/url.mojom";
+
[Native]
enum NaClErrorCode;
+[Native]
+enum NaClAppProcessType;
+
+[Native]
+struct NaClResourcePrefetchRequest;
+
+struct NaClLaunchResult {
+ // For plugin <-> renderer PPAPI communication.
+ handle<message_pipe> ppapi_ipc_channel_handle;
+
+ // For plugin loader <-> renderer control communication (loading and
+ // starting nexe).
+ NaClRendererHost& trusted_ipc_channel_handle;
+
+ // For plugin <-> renderer ManifestService communication.
+ handle<message_pipe> manifest_service_ipc_channel_handle;
+
+ int32 plugin_pid;
+ int32 plugin_child_id;
+
+ // For NaCl <-> renderer crash information reporting.
+ handle<shared_buffer> crash_info_shmem_handle;
+};
+
+struct NaClLaunchParams {
+ url.mojom.Url manifest_url;
+ mojo.common.mojom.File nexe_file;
+ uint64 nexe_token_lo;
+ uint64 nexe_token_hi;
+ array<NaClResourcePrefetchRequest> resource_prefetch_request_list;
+ int32 render_view_id;
+ uint32 permission_bits;
+ bool uses_nonsfi_mode;
+ NaClAppProcessType process_type;
+};
+
+[Native]
+struct PnaclCacheInfo;
+
interface NaClRendererHost {
// This message must be synchronous to ensure that the exit status is sent
// from NaCl to the renderer before the NaCl process exits very soon after.
@@ -24,3 +66,69 @@ interface NaClRendererHost {
// When this interface is closed, it indicates that the NaCl loader process
// should exit.
interface NaClExitControl {};
+
+interface NaClHost {
+ // A renderer sends this to the browser process when it wants to start
+ // a new instance of the Native Client process.
+ [Sync]
+ LaunchNaCl(NaClLaunchParams launch_params) => (
+ NaClLaunchResult? result,
+ string error_message);
+
+ // A renderer sends this to the browser process when it wants to
+ // open a file for from the Pnacl component directory.
+ [Sync]
+ GetReadonlyPnaclFd(
+ string name_of_requested_pnacl_file,
+ bool is_executable) => (
+ mojo.common.mojom.File? output_file,
+ uint64 file_token_lo,
+ uint64 file_token_hi);
+
+ // A renderer sends this to the browser process when it wants to
+ // create a temporary file.
+ [Sync]
+ NaClCreateTemporaryFile() => (mojo.common.mojom.File? out_file);
+
+ // A renderer sends this to the browser to request a file descriptor for
+ // a translated nexe.
+ NexeTempFileRequest(
+ int32 render_view_id,
+ int32 instance,
+ PnaclCacheInfo cache_info) => (
+ int32 instance,
+ mojo.common.mojom.File? output_file,
+ bool is_cache_hit);
+
+
+ // A renderer sends this to the browser to report that its translation has
+ // finished and its temp file contains the translated nexe.
+ ReportTranslationFinished(int32 instance, bool success);
+
+ // A renderer sends this to the browser process to report when the client
+ // architecture is not listed in the manifest.
+ MissingArchError(int32 render_view_id);
+
+ // A renderer sends this to the browser process when it wants to
+ // open a NaCl executable file from an installed application directory.
+ [Sync]
+ OpenNaClExecutable(
+ int32 render_view_id,
+ url.mojom.Url url_of_nacl_executable_file,
+ bool enable_validation_caching) => (
+ mojo.common.mojom.File? output_file,
+ uint64 file_token_lo,
+ uint64 file_token_hi);
+
+ // A renderer sends this to the browser process to determine how many
+ // processors are online.
+ [Sync]
+ NaClGetNumProcessors() => (int32 number_of_processors);
+
+ // A renderer sends this to the browser process to determine if the
+ // NaCl application started from the given NMF URL will be debugged.
+ // If not (filtered out by commandline flags), it sets should_debug to false.
+ [Sync]
+ NaClDebugEnabledForURL(url.mojom.Url alleged_url_of_nmf_file) => (
+ bool should_debug);
+};
« no previous file with comments | « components/nacl/common/OWNERS ('k') | components/nacl/common/nacl.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698