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

Side by Side Diff: shell/child_process_host.h

Issue 1143993004: Revert "Revert "Make shell child processes slaves."" (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « shell/child_main.cc ('k') | shell/child_process_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 SHELL_CHILD_PROCESS_HOST_H_ 5 #ifndef SHELL_CHILD_PROCESS_HOST_H_
6 #define SHELL_CHILD_PROCESS_HOST_H_ 6 #define SHELL_CHILD_PROCESS_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string>
11
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/process/process.h" 13 #include "base/process/process.h"
12 #include "mojo/edk/embedder/channel_info_forward.h" 14 #include "mojo/edk/embedder/channel_info_forward.h"
13 #include "mojo/edk/embedder/platform_channel_pair.h" 15 #include "mojo/edk/embedder/platform_channel_pair.h"
14 #include "mojo/edk/embedder/scoped_platform_handle.h" 16 #include "mojo/edk/embedder/scoped_platform_handle.h"
15 #include "mojo/public/cpp/bindings/error_handler.h" 17 #include "mojo/public/cpp/bindings/error_handler.h"
16 #include "shell/child_controller.mojom.h" 18 #include "shell/child_controller.mojom.h"
17 19
18 namespace shell { 20 namespace shell {
19 21
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void ExitNow(int32_t exit_code); 59 void ExitNow(int32_t exit_code);
58 60
59 // TODO(vtl): This is virtual, so tests can override it, but really |Start()| 61 // TODO(vtl): This is virtual, so tests can override it, but really |Start()|
60 // should take a callback (see above) and this should be private. 62 // should take a callback (see above) and this should be private.
61 virtual void DidStart(bool success); 63 virtual void DidStart(bool success);
62 64
63 private: 65 private:
64 // Callback for |mojo::embedder::CreateChannel()|. 66 // Callback for |mojo::embedder::CreateChannel()|.
65 void DidCreateChannel(mojo::embedder::ChannelInfo* channel_info); 67 void DidCreateChannel(mojo::embedder::ChannelInfo* channel_info);
66 68
67 bool DoLaunch(); 69 bool DoLaunch(const std::string& child_connection_id);
68 70
69 void AppCompleted(int32_t result); 71 void AppCompleted(int32_t result);
70 72
71 // |mojo::ErrorHandler| methods: 73 // |mojo::ErrorHandler| methods:
72 void OnConnectionError() override; 74 void OnConnectionError() override;
73 75
74 Context* const context_; 76 Context* const context_;
75 mojo::embedder::PlatformChannelPair platform_channel_pair_; 77 mojo::embedder::PlatformChannelPair platform_channel_pair_;
76 78
77 ChildControllerPtr controller_; 79 ChildControllerPtr controller_;
78 mojo::embedder::ChannelInfo* channel_info_; 80 mojo::embedder::ChannelInfo* channel_info_;
79 ChildController::StartAppCallback on_app_complete_; 81 ChildController::StartAppCallback on_app_complete_;
80 82
81 base::Process child_process_; 83 base::Process child_process_;
82 84
83 DISALLOW_COPY_AND_ASSIGN(ChildProcessHost); 85 DISALLOW_COPY_AND_ASSIGN(ChildProcessHost);
84 }; 86 };
85 87
86 } // namespace shell 88 } // namespace shell
87 89
88 #endif // SHELL_CHILD_PROCESS_HOST_H_ 90 #endif // SHELL_CHILD_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « shell/child_main.cc ('k') | shell/child_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698