| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_ANDROID_CHILD_PROCESS_LAUNCHER_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_CHILD_PROCESS_LAUNCHER_ANDROID_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_CHILD_PROCESS_LAUNCHER_ANDROID_H_ | 6 #define CONTENT_BROWSER_ANDROID_CHILD_PROCESS_LAUNCHER_ANDROID_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 typedef base::Callback<void(base::ProcessHandle)> StartChildProcessCallback; | 23 typedef base::Callback<void(base::ProcessHandle)> StartChildProcessCallback; |
| 24 // Starts a process as a child process spawned by the Android | 24 // Starts a process as a child process spawned by the Android |
| 25 // ActivityManager. | 25 // ActivityManager. |
| 26 // The created process handle is returned to the |callback| on success, 0 is | 26 // The created process handle is returned to the |callback| on success, 0 is |
| 27 // returned if the process could not be created. | 27 // returned if the process could not be created. |
| 28 void StartChildProcess( | 28 void StartChildProcess( |
| 29 const base::CommandLine::StringVector& argv, | 29 const base::CommandLine::StringVector& argv, |
| 30 int child_process_id, | 30 int child_process_id, |
| 31 const std::unique_ptr<FileDescriptorInfo> files_to_register, | 31 const std::unique_ptr<FileDescriptorInfo> files_to_register, |
| 32 const std::map<int, base::MemoryMappedFile::Region>& regions, | |
| 33 const StartChildProcessCallback& callback); | 32 const StartChildProcessCallback& callback); |
| 34 | 33 |
| 35 // Stops a child process based on the handle returned form | 34 // Stops a child process based on the handle returned form |
| 36 // StartChildProcess. | 35 // StartChildProcess. |
| 37 void StopChildProcess(base::ProcessHandle handle); | 36 void StopChildProcess(base::ProcessHandle handle); |
| 38 | 37 |
| 39 bool IsChildProcessOomProtected(base::ProcessHandle handle); | 38 bool IsChildProcessOomProtected(base::ProcessHandle handle); |
| 40 | 39 |
| 41 void SetChildProcessInForeground(base::ProcessHandle handle, | 40 void SetChildProcessInForeground(base::ProcessHandle handle, |
| 42 bool in_foreground); | 41 bool in_foreground); |
| 43 bool RegisterChildProcessLauncher(JNIEnv* env); | 42 bool RegisterChildProcessLauncher(JNIEnv* env); |
| 44 | 43 |
| 45 } // namespace content | 44 } // namespace content |
| 46 | 45 |
| 47 #endif // CONTENT_BROWSER_ANDROID_CHILD_PROCESS_LAUNCHER_ANDROID_H_ | 46 #endif // CONTENT_BROWSER_ANDROID_CHILD_PROCESS_LAUNCHER_ANDROID_H_ |
| OLD | NEW |