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

Unified Diff: content/browser/android/sandboxed_process_launcher.h

Issue 10541110: Added sandboxed process launcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed ProcessID and Sync Created 8 years, 6 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 | « content/app/android/content_jni_registrar.cc ('k') | content/browser/android/sandboxed_process_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/sandboxed_process_launcher.h
diff --git a/content/browser/android/sandboxed_process_launcher.h b/content/browser/android/sandboxed_process_launcher.h
new file mode 100644
index 0000000000000000000000000000000000000000..8883d27794fdf8f5a961c9f6f2133f74ad5126da
--- /dev/null
+++ b/content/browser/android/sandboxed_process_launcher.h
@@ -0,0 +1,46 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_ANDROID_SANDBOXED_PROCESS_LAUNCHER_H_
+#define CONTENT_BROWSER_ANDROID_SANDBOXED_PROCESS_LAUNCHER_H_
+
+#include <jni.h>
+
+#include "base/android/scoped_java_ref.h"
+#include "base/callback.h"
+#include "base/command_line.h"
+#include "base/process.h"
+
+namespace content {
+
+typedef base::Callback<void(base::ProcessHandle)> StartSandboxedProcessCallback;
jam 2012/06/13 16:18:12 why are you using ProcessHandle? I've been trying
michaelbai 2012/06/13 16:23:30 I misunderstood your comment, and will have a anot
+// Starts a process as a sandboxed process spawned by the Android
+// ActivityManager.
+// The connection object returned may be used with a subsequent call to
+// CancelStartSandboxedProcess().
+// The created process pid is returned to the |callback| on success, 0 is
+// retuned if the process could not be created.
+base::android::ScopedJavaLocalRef<jobject> StartSandboxedProcess(
+ const CommandLine::StringVector& argv,
+ int ipc_fd,
+ int crash_fd,
+ const StartSandboxedProcessCallback& callback);
+
+// Cancel the starting of a sanboxed process.
+//
+// |connection| is the one returned by StartSandboxedProcess.
+void CancelStartSandboxedProcess(
+ const base::android::JavaRef<jobject>& connection);
+
+// Stops a sandboxed process based on the handle returned form
+// StartSandboxedProcess.
+void StopSandboxedProcess(base::ProcessHandle handle);
+
+// Registers JNI methods, this must be called before any other methods in this
+// file.
+bool RegisterSandboxedProcessLauncher(JNIEnv* env);
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_ANDROID_SANDBOXED_PROCESS_LAUNCHER_H_
« no previous file with comments | « content/app/android/content_jni_registrar.cc ('k') | content/browser/android/sandboxed_process_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698