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 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 // ActivityManager. | 22 // ActivityManager. |
23 // The created process handle is returned to the |callback| on success, 0 is | 23 // The created process handle is returned to the |callback| on success, 0 is |
24 // returned if the process could not be created. | 24 // returned if the process could not be created. |
25 void StartChildProcess( | 25 void StartChildProcess( |
26 const base::CommandLine::StringVector& argv, | 26 const base::CommandLine::StringVector& argv, |
27 int child_process_id, | 27 int child_process_id, |
28 const scoped_ptr<FileDescriptorInfo> files_to_register, | 28 const scoped_ptr<FileDescriptorInfo> files_to_register, |
29 const std::map<int, base::MemoryMappedFile::Region>& regions, | 29 const std::map<int, base::MemoryMappedFile::Region>& regions, |
30 const StartChildProcessCallback& callback); | 30 const StartChildProcessCallback& callback); |
31 | 31 |
| 32 // Starts the background download process if it hasn't been started. |
| 33 // TODO(qinmin): pass the download parameters here and pass it to java side. |
| 34 void StartDownloadProcessIfNecessary(); |
| 35 |
32 // Stops a child process based on the handle returned form | 36 // Stops a child process based on the handle returned form |
33 // StartChildProcess. | 37 // StartChildProcess. |
34 void StopChildProcess(base::ProcessHandle handle); | 38 void StopChildProcess(base::ProcessHandle handle); |
35 | 39 |
36 bool IsChildProcessOomProtected(base::ProcessHandle handle); | 40 bool IsChildProcessOomProtected(base::ProcessHandle handle); |
37 | 41 |
38 void SetChildProcessInForeground(base::ProcessHandle handle, | 42 void SetChildProcessInForeground(base::ProcessHandle handle, |
39 bool in_foreground); | 43 bool in_foreground); |
40 | 44 |
41 void RegisterViewSurface(int surface_id, jobject j_surface); | 45 void RegisterViewSurface(int surface_id, jobject j_surface); |
42 | 46 |
43 void UnregisterViewSurface(int surface_id); | 47 void UnregisterViewSurface(int surface_id); |
44 | 48 |
45 void CreateSurfaceTextureSurface(int surface_texture_id, | 49 void CreateSurfaceTextureSurface(int surface_texture_id, |
46 int client_id, | 50 int client_id, |
47 gfx::SurfaceTexture* surface_texture); | 51 gfx::SurfaceTexture* surface_texture); |
48 | 52 |
49 void DestroySurfaceTextureSurface(int surface_texture_id, int client_id); | 53 void DestroySurfaceTextureSurface(int surface_texture_id, int client_id); |
50 | 54 |
51 gfx::ScopedJavaSurface GetSurfaceTextureSurface(int surface_texture_id, | 55 gfx::ScopedJavaSurface GetSurfaceTextureSurface(int surface_texture_id, |
52 int client_id); | 56 int client_id); |
53 | 57 |
54 bool RegisterChildProcessLauncher(JNIEnv* env); | 58 bool RegisterChildProcessLauncher(JNIEnv* env); |
55 | 59 |
56 } // namespace content | 60 } // namespace content |
57 | 61 |
58 #endif // CONTENT_BROWSER_ANDROID_CHILD_PROCESS_LAUNCHER_ANDROID_H_ | 62 #endif // CONTENT_BROWSER_ANDROID_CHILD_PROCESS_LAUNCHER_ANDROID_H_ |
OLD | NEW |