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

Side by Side Diff: mojo/shell/runner/host/out_of_process_native_runner.h

Issue 1801963002: Change primordial pipes to ShellClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase onto catalog CL Created 4 years, 9 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 MOJO_SHELL_RUNNER_HOST_OUT_OF_PROCESS_NATIVE_RUNNER_H_ 5 #ifndef MOJO_SHELL_RUNNER_HOST_OUT_OF_PROCESS_NATIVE_RUNNER_H_
6 #define MOJO_SHELL_RUNNER_HOST_OUT_OF_PROCESS_NATIVE_RUNNER_H_ 6 #define MOJO_SHELL_RUNNER_HOST_OUT_OF_PROCESS_NATIVE_RUNNER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string>
11
10 #include "base/callback.h" 12 #include "base/callback.h"
11 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
12 #include "base/macros.h" 14 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
14 #include "mojo/shell/native_runner.h" 16 #include "mojo/shell/native_runner.h"
15 #include "mojo/shell/public/interfaces/shell_client_factory.mojom.h"
16 17
17 namespace base { 18 namespace base {
18 class TaskRunner; 19 class TaskRunner;
19 } 20 }
20 21
21 namespace mojo { 22 namespace mojo {
22 namespace shell { 23 namespace shell {
23 24
24 class ChildProcessHost; 25 class ChildProcessHost;
25 class NativeRunnerDelegate; 26 class NativeRunnerDelegate;
26 27
27 // An implementation of |NativeRunner| that loads/runs the given app (from the 28 // An implementation of |NativeRunner| that loads/runs the given app (from the
28 // file system) in a separate process (of its own). 29 // file system) in a separate process (of its own).
29 class OutOfProcessNativeRunner : public NativeRunner { 30 class OutOfProcessNativeRunner : public NativeRunner {
30 public: 31 public:
31 OutOfProcessNativeRunner(base::TaskRunner* launch_process_runner, 32 OutOfProcessNativeRunner(base::TaskRunner* launch_process_runner,
32 NativeRunnerDelegate* delegate); 33 NativeRunnerDelegate* delegate);
33 ~OutOfProcessNativeRunner() override; 34 ~OutOfProcessNativeRunner() override;
34 35
35 // NativeRunner: 36 // NativeRunner:
36 void Start( 37 mojom::ShellClientPtr Start(
37 const base::FilePath& app_path, 38 const base::FilePath& app_path,
38 const Identity& identity, 39 const Identity& identity,
39 bool start_sandboxed, 40 bool start_sandboxed,
40 mojom::ShellClientRequest request,
41 const base::Callback<void(base::ProcessId)>& pid_available_callback, 41 const base::Callback<void(base::ProcessId)>& pid_available_callback,
42 const base::Closure& app_completed_callback) override; 42 const base::Closure& app_completed_callback) override;
43 43
44 private: 44 private:
45 void AppCompleted(); 45 void AppCompleted();
46 46
47 base::TaskRunner* const launch_process_runner_; 47 base::TaskRunner* const launch_process_runner_;
48 NativeRunnerDelegate* delegate_; 48 NativeRunnerDelegate* delegate_;
49 49
50 base::FilePath app_path_; 50 base::FilePath app_path_;
(...skipping 16 matching lines...) Expand all
67 base::TaskRunner* const launch_process_runner_; 67 base::TaskRunner* const launch_process_runner_;
68 NativeRunnerDelegate* delegate_; 68 NativeRunnerDelegate* delegate_;
69 69
70 DISALLOW_COPY_AND_ASSIGN(OutOfProcessNativeRunnerFactory); 70 DISALLOW_COPY_AND_ASSIGN(OutOfProcessNativeRunnerFactory);
71 }; 71 };
72 72
73 } // namespace shell 73 } // namespace shell
74 } // namespace mojo 74 } // namespace mojo
75 75
76 #endif // MOJO_SHELL_RUNNER_HOST_OUT_OF_PROCESS_NATIVE_RUNNER_H_ 76 #endif // MOJO_SHELL_RUNNER_HOST_OUT_OF_PROCESS_NATIVE_RUNNER_H_
OLDNEW
« no previous file with comments | « mojo/shell/runner/host/in_process_native_runner.cc ('k') | mojo/shell/runner/host/out_of_process_native_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698