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

Unified Diff: src/trusted/plugin/nacl_subprocess.h

Issue 7799028: Remove src/trusted/plugin (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: fix gyp file for necessary -I Created 9 years, 4 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 | « src/trusted/plugin/nacl_entry_points.h ('k') | src/trusted/plugin/nacl_subprocess.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/plugin/nacl_subprocess.h
diff --git a/src/trusted/plugin/nacl_subprocess.h b/src/trusted/plugin/nacl_subprocess.h
deleted file mode 100644
index 7a893d3b231a32582f25117bb1f17d0f9bfa8d53..0000000000000000000000000000000000000000
--- a/src/trusted/plugin/nacl_subprocess.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2011 The Native Client Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Instances of NaCl modules spun up within the plugin as a subprocess.
-// This may represent the "main" nacl module, or it may represent helpers
-// that perform various tasks within the plugin, for example,
-// a NaCl module for a compiler could be loaded to translate LLVM bitcode
-// into native code.
-
-#ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_NACL_SUBPROCESS_H_
-#define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_NACL_SUBPROCESS_H_
-
-#include "native_client/src/include/nacl_string.h"
-#include "native_client/src/trusted/plugin/service_runtime.h"
-#include "native_client/src/trusted/plugin/srpc_client.h"
-
-namespace plugin {
-
-class Plugin;
-class ServiceRuntime;
-
-// Identifier for helper NaCl nexes. Should be non-negative for valid nexes.
-typedef int32_t NaClSubprocessId;
-const NaClSubprocessId kInvalidNaClSubprocessId = -1;
-const NaClSubprocessId kMainSubprocessId = -2;
-
-// A class representing an instance of a NaCl module, loaded by the plugin.
-class NaClSubprocess {
- public:
- NaClSubprocess(NaClSubprocessId assigned_id,
- ServiceRuntime* service_runtime,
- SrpcClient* srpc_client)
- : assigned_id_(assigned_id),
- service_runtime_(service_runtime),
- srpc_client_(srpc_client) {
- }
- virtual ~NaClSubprocess();
-
- ServiceRuntime* service_runtime() const { return service_runtime_.get(); }
- void set_service_runtime(ServiceRuntime* service_runtime) {
- service_runtime_.reset(service_runtime);
- }
-
- // The socket used for communicating w/ the NaCl module.
- SrpcClient* srpc_client() const { return srpc_client_.get(); }
- void set_socket(SrpcClient* srpc_client) { srpc_client_.reset(srpc_client); }
-
- // A basic description of the subprocess.
- nacl::string description() const;
-
- // A detailed description of the subprocess that may contain addresses.
- // Only use for debugging, but do not expose this to untrusted webapps.
- nacl::string detailed_description() const;
-
- // Start up interfaces.
- bool StartSrpcServices();
- bool StartJSObjectProxy(Plugin* plugin, ErrorInfo* error_info);
-
- // Interact.
- bool HasMethod(uintptr_t method_id) const;
- bool InitParams(uintptr_t method_id, SrpcParams* params) const;
- bool Invoke(uintptr_t method_id, SrpcParams* params) const;
-
- // Fully shut down the subprocess.
- void Shutdown();
-
- private:
- NACL_DISALLOW_COPY_AND_ASSIGN(NaClSubprocess);
-
- NaClSubprocessId assigned_id_;
-
- // The service runtime representing the NaCl module instance.
- nacl::scoped_ptr<ServiceRuntime> service_runtime_;
-
- // Ownership of srpc_client taken from the service runtime.
- nacl::scoped_ptr<SrpcClient> srpc_client_;
-};
-
-} // namespace plugin
-
-#endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_NACL_SUBPROCESS_H_
« no previous file with comments | « src/trusted/plugin/nacl_entry_points.h ('k') | src/trusted/plugin/nacl_subprocess.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698