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 14 matching lines...) Expand all Loading... |
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, | 32 const std::map<int, base::MemoryMappedFile::Region>& regions, |
33 const StartChildProcessCallback& callback); | 33 const StartChildProcessCallback& callback); |
34 | 34 |
35 // Starts the background download process if it hasn't been started. | |
36 // TODO(qinmin): pass the download parameters here and pass it to java side. | |
37 void StartDownloadProcessIfNecessary(); | |
38 | |
39 // Stops a child process based on the handle returned form | 35 // Stops a child process based on the handle returned form |
40 // StartChildProcess. | 36 // StartChildProcess. |
41 void StopChildProcess(base::ProcessHandle handle); | 37 void StopChildProcess(base::ProcessHandle handle); |
42 | 38 |
43 bool IsChildProcessOomProtected(base::ProcessHandle handle); | 39 bool IsChildProcessOomProtected(base::ProcessHandle handle); |
44 | 40 |
45 void SetChildProcessInForeground(base::ProcessHandle handle, | 41 void SetChildProcessInForeground(base::ProcessHandle handle, |
46 bool in_foreground); | 42 bool in_foreground); |
47 | 43 |
48 void RegisterViewSurface(int surface_id, | 44 void RegisterViewSurface(int surface_id, |
(...skipping 10 matching lines...) Expand all Loading... |
59 void DestroySurfaceTextureSurface(int surface_texture_id, int client_id); | 55 void DestroySurfaceTextureSurface(int surface_texture_id, int client_id); |
60 | 56 |
61 gl::ScopedJavaSurface GetSurfaceTextureSurface(int surface_texture_id, | 57 gl::ScopedJavaSurface GetSurfaceTextureSurface(int surface_texture_id, |
62 int client_id); | 58 int client_id); |
63 | 59 |
64 bool RegisterChildProcessLauncher(JNIEnv* env); | 60 bool RegisterChildProcessLauncher(JNIEnv* env); |
65 | 61 |
66 } // namespace content | 62 } // namespace content |
67 | 63 |
68 #endif // CONTENT_BROWSER_ANDROID_CHILD_PROCESS_LAUNCHER_ANDROID_H_ | 64 #endif // CONTENT_BROWSER_ANDROID_CHILD_PROCESS_LAUNCHER_ANDROID_H_ |
OLD | NEW |