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

Side by Side Diff: content/browser/android/child_process_launcher_android.h

Issue 2594203004: Unifying ChildProcessLauncher across platforms. (Closed)
Patch Set: Fixed Mac tests. Created 3 years, 11 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
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_CHILD_PROCESS_LAUNCHER_ANDROID_H_
6 #define CONTENT_BROWSER_ANDROID_CHILD_PROCESS_LAUNCHER_ANDROID_H_
7
8 #include <jni.h>
9
10 #include <map>
11 #include <memory>
12
13 #include "base/android/scoped_java_ref.h"
14 #include "base/callback.h"
15 #include "base/command_line.h"
16 #include "base/files/memory_mapped_file.h"
17 #include "base/process/process.h"
18 #include "content/public/browser/file_descriptor_info.h"
19 #include "ui/gl/android/scoped_java_surface.h"
20
21 namespace content {
22
23 typedef base::Callback<void(base::ProcessHandle)> StartChildProcessCallback;
24 // Starts a process as a child process spawned by the Android
25 // ActivityManager.
26 // The created process handle is returned to the |callback| on success, 0 is
27 // returned if the process could not be created.
28 void StartChildProcess(
29 const base::CommandLine::StringVector& argv,
30 int child_process_id,
31 const std::unique_ptr<FileDescriptorInfo> files_to_register,
32 const StartChildProcessCallback& callback);
33
34 // Stops a child process based on the handle returned form
35 // StartChildProcess.
36 void StopChildProcess(base::ProcessHandle handle);
37
38 bool IsChildProcessOomProtected(base::ProcessHandle handle);
39
40 void SetChildProcessInForeground(base::ProcessHandle handle,
41 bool in_foreground);
42 bool RegisterChildProcessLauncher(JNIEnv* env);
43
44 } // namespace content
45
46 #endif // CONTENT_BROWSER_ANDROID_CHILD_PROCESS_LAUNCHER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698