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

Side by Side Diff: shell/app_child_process_host.h

Issue 1040413003: Shell: Remove the test child stuff. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 8 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/app_child_process.mojom ('k') | shell/app_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_APP_CHILD_PROCESS_HOST_H_ 5 #ifndef SHELL_APP_CHILD_PROCESS_HOST_H_
6 #define SHELL_APP_CHILD_PROCESS_HOST_H_ 6 #define SHELL_APP_CHILD_PROCESS_HOST_H_
7 7
8 #include <stdint.h>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "mojo/edk/embedder/channel_info_forward.h" 11 #include "mojo/edk/embedder/channel_info_forward.h"
10 #include "shell/app_child_process.mojom.h" 12 #include "shell/app_child_process.mojom.h"
11 #include "shell/child_process_host.h" 13 #include "shell/child_process_host.h"
12 14
13 namespace mojo { 15 namespace mojo {
14 namespace shell { 16 namespace shell {
15 17
16 // A subclass of |ChildProcessHost| to host a |TYPE_APP| child process, which 18 // A subclass of |ChildProcessHost| to host a |TYPE_APP| child process, which
17 // runs a single app (loaded from the file system). 19 // runs a single app (loaded from the file system).
18 // 20 //
19 // Note: After |Start()|, |StartApp| must be called and this object must 21 // Note: After |Start()|, |StartApp| must be called and this object must
20 // remained alive until the |on_app_complete| callback is called. 22 // remained alive until the |on_app_complete| callback is called.
21 class AppChildProcessHost : public ChildProcessHost, 23 class AppChildProcessHost : public ChildProcessHost,
22 public ChildProcessHost::Delegate { 24 public ChildProcessHost::Delegate {
23 public: 25 public:
24 explicit AppChildProcessHost(Context* context); 26 explicit AppChildProcessHost(Context* context);
25 ~AppChildProcessHost() override; 27 ~AppChildProcessHost() override;
26 28
27 // See |AppChildController::StartApp|. 29 // See |AppChildController|:
28 void StartApp(const String& app_path, 30 void StartApp(const String& app_path,
29 bool clean_app_path, 31 bool clean_app_path,
30 InterfaceRequest<Application> application_request, 32 InterfaceRequest<Application> application_request,
31 const AppChildController::StartAppCallback& on_app_complete); 33 const AppChildController::StartAppCallback& on_app_complete);
34 void ExitNow(int32_t exit_code);
32 35
33 private:
34 // |ChildProcessHost::Delegate| methods: 36 // |ChildProcessHost::Delegate| methods:
35 void WillStart() override; 37 void WillStart() override;
36 void DidStart(bool success) override; 38 void DidStart(bool success) override;
37 39
40 private:
38 // Callback for |embedder::CreateChannel()|. 41 // Callback for |embedder::CreateChannel()|.
39 void DidCreateChannel(embedder::ChannelInfo* channel_info); 42 void DidCreateChannel(embedder::ChannelInfo* channel_info);
40 43
41 void AppCompleted(int32_t result); 44 void AppCompleted(int32_t result);
42 45
43 AppChildControllerPtr controller_; 46 AppChildControllerPtr controller_;
44 embedder::ChannelInfo* channel_info_; 47 embedder::ChannelInfo* channel_info_;
45 AppChildController::StartAppCallback on_app_complete_; 48 AppChildController::StartAppCallback on_app_complete_;
46 49
47 DISALLOW_COPY_AND_ASSIGN(AppChildProcessHost); 50 DISALLOW_COPY_AND_ASSIGN(AppChildProcessHost);
48 }; 51 };
49 52
50 } // namespace shell 53 } // namespace shell
51 } // namespace mojo 54 } // namespace mojo
52 55
53 #endif // SHELL_APP_CHILD_PROCESS_HOST_H_ 56 #endif // SHELL_APP_CHILD_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « shell/app_child_process.mojom ('k') | shell/app_child_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698