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

Side by Side 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: Address comments and using callback. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 #ifndef CONTENT_BROWSER_ANDROID_SANDBOXED_PROCESS_LAUNCHER_H_
6 #define CONTENT_BROWSER_ANDROID_SANDBOXED_PROCESS_LAUNCHER_H_
7
8 #include <jni.h>
9
10 #include "base/android/scoped_java_ref.h"
11 #include "base/callback.h"
12 #include "base/command_line.h"
13 #include "base/process.h"
14
15 namespace content {
16
17 typedef base::ProcessHandle ProcessID;
jam 2012/06/12 20:44:45 don't typedef this, just use base::ProcessId
18 typedef base::Callback<void(ProcessID)> StartSandboxedProcessCallback;
19 // Starts a process as a sandboxed process spawned by the Android
20 // ActivityManager.
21 // The connection object returned may be used with a subsequent call to
22 // CancelStartSandboxedProcess().
23 // The created process pid is returned to the |callback| on success, 0 is
24 // retuned if the process could not be created.
25 base::android::ScopedJavaLocalRef<jobject> StartSandboxedProcess(
26 const CommandLine::StringVector& argv,
27 int ipc_fd,
28 int crash_fd,
29 const StartSandboxedProcessCallback& callback);
30
31 // Cancel the starting of a sanboxed process.
32 //
33 // |connection| is the one returned by StartSandboxedProcess.
34 void CancelStartSandboxedProcess(
35 const base::android::JavaRef<jobject>& connection);
36
37 // Stops a sandboxed process based on the handle returned form
38 // StartSandboxedProcess.
39 void StopSandboxedProcess(ProcessID handle);
40
41 // Registers JNI methods, this must be called before any other methods in this
42 // file.
43 bool RegisterSandboxedProcessLauncher(JNIEnv* env);
44
45 } // namespace content
46
47 #endif // CONTENT_BROWSER_ANDROID_SANDBOXED_PROCESS_LAUNCHER_H_
OLDNEW
« 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