OLD | NEW |
| (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/callback.h" | |
11 #include "base/command_line.h" | |
12 #include "base/platform_file.h" | |
13 #include "base/process.h" | |
14 #include "content/public/browser/file_descriptor_info.h" | |
15 | |
16 namespace content { | |
17 | |
18 typedef base::Callback<void(base::ProcessHandle)> StartSandboxedProcessCallback; | |
19 // Starts a process as a sandboxed process spawned by the Android | |
20 // ActivityManager. | |
21 // The created process handle is returned to the |callback| on success, 0 is | |
22 // retuned if the process could not be created. | |
23 void StartSandboxedProcess( | |
24 const CommandLine::StringVector& argv, | |
25 const std::vector<FileDescriptorInfo>& files_to_register, | |
26 const StartSandboxedProcessCallback& callback); | |
27 | |
28 // Stops a sandboxed process based on the handle returned form | |
29 // StartSandboxedProcess. | |
30 void StopSandboxedProcess(base::ProcessHandle handle); | |
31 | |
32 // Registers JNI methods, this must be called before any other methods in this | |
33 // file. | |
34 bool RegisterSandboxedProcessLauncher(JNIEnv* env); | |
35 | |
36 } // namespace content | |
37 | |
38 #endif // CONTENT_BROWSER_ANDROID_SANDBOXED_PROCESS_LAUNCHER_H_ | |
39 | |
OLD | NEW |