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

Side by Side Diff: services/shell/runner/host/child_process_host.h

Issue 2118083002: ShellClient -> Service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mus2
Patch Set: . Created 4 years, 5 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 SERVICES_SHELL_RUNNER_HOST_CHILD_PROCESS_HOST_H_ 5 #ifndef SERVICES_SHELL_RUNNER_HOST_CHILD_PROCESS_HOST_H_
6 #define SERVICES_SHELL_RUNNER_HOST_CHILD_PROCESS_HOST_H_ 6 #define SERVICES_SHELL_RUNNER_HOST_CHILD_PROCESS_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 12
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 #include "base/process/process.h" 19 #include "base/process/process.h"
20 #include "base/synchronization/lock.h" 20 #include "base/synchronization/lock.h"
21 #include "base/synchronization/waitable_event.h" 21 #include "base/synchronization/waitable_event.h"
22 #include "mojo/edk/embedder/platform_channel_pair.h" 22 #include "mojo/edk/embedder/platform_channel_pair.h"
23 #include "mojo/public/cpp/system/message_pipe.h" 23 #include "mojo/public/cpp/system/message_pipe.h"
24 #include "services/shell/public/cpp/identity.h" 24 #include "services/shell/public/cpp/identity.h"
25 #include "services/shell/public/interfaces/shell_client_factory.mojom.h" 25 #include "services/shell/public/interfaces/service_factory.mojom.h"
26 #include "services/shell/runner/host/child_process_host.h" 26 #include "services/shell/runner/host/child_process_host.h"
27 27
28 namespace base { 28 namespace base {
29 class TaskRunner; 29 class TaskRunner;
30 } 30 }
31 31
32 namespace shell { 32 namespace shell {
33 33
34 class Identity; 34 class Identity;
35 class NativeRunnerDelegate; 35 class NativeRunnerDelegate;
(...skipping 17 matching lines...) Expand all
53 // mojo application we wish to start. 53 // mojo application we wish to start.
54 ChildProcessHost(base::TaskRunner* launch_process_runner, 54 ChildProcessHost(base::TaskRunner* launch_process_runner,
55 NativeRunnerDelegate* delegate, 55 NativeRunnerDelegate* delegate,
56 bool start_sandboxed, 56 bool start_sandboxed,
57 const Identity& target, 57 const Identity& target,
58 const base::FilePath& app_path); 58 const base::FilePath& app_path);
59 virtual ~ChildProcessHost(); 59 virtual ~ChildProcessHost();
60 60
61 // |Start()|s the child process; calls |DidStart()| (on the thread on which 61 // |Start()|s the child process; calls |DidStart()| (on the thread on which
62 // |Start()| was called) when the child has been started (or failed to start). 62 // |Start()| was called) when the child has been started (or failed to start).
63 mojom::ShellClientPtr Start(const Identity& target, 63 mojom::ServicePtr Start(const Identity& target,
64 const ProcessReadyCallback& callback, 64 const ProcessReadyCallback& callback,
65 const base::Closure& quit_closure); 65 const base::Closure& quit_closure);
66 66
67 // Waits for the child process to terminate. 67 // Waits for the child process to terminate.
68 void Join(); 68 void Join();
69 69
70 protected: 70 protected:
71 void DidStart(const ProcessReadyCallback& callback); 71 void DidStart(const ProcessReadyCallback& callback);
72 72
73 private: 73 private:
(...skipping 16 matching lines...) Expand all
90 base::WaitableEvent start_child_process_event_; 90 base::WaitableEvent start_child_process_event_;
91 91
92 base::WeakPtrFactory<ChildProcessHost> weak_factory_; 92 base::WeakPtrFactory<ChildProcessHost> weak_factory_;
93 93
94 DISALLOW_COPY_AND_ASSIGN(ChildProcessHost); 94 DISALLOW_COPY_AND_ASSIGN(ChildProcessHost);
95 }; 95 };
96 96
97 } // namespace shell 97 } // namespace shell
98 98
99 #endif // SERVICES_SHELL_RUNNER_HOST_CHILD_PROCESS_HOST_H_ 99 #endif // SERVICES_SHELL_RUNNER_HOST_CHILD_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « services/shell/runner/host/child_process_base.cc ('k') | services/shell/runner/host/child_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698