OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ |
6 #define CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ | 6 #define CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ |
7 | 7 |
8 #include "base/files/scoped_file.h" | 8 #include "base/files/scoped_file.h" |
| 9 #include "base/process/process_handle.h" |
9 #include "build/build_config.h" | 10 #include "build/build_config.h" |
10 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
11 #include "ipc/ipc_channel_proxy.h" | 12 #include "ipc/ipc_channel_proxy.h" |
12 | 13 |
13 namespace base { | 14 namespace base { |
14 class FilePath; | 15 class FilePath; |
15 } | 16 } |
16 | 17 |
17 namespace IPC { | 18 namespace IPC { |
18 class MessageFilter; | 19 class MessageFilter; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // Creates the IPC channel. Returns the channel id if it succeeded, an | 91 // Creates the IPC channel. Returns the channel id if it succeeded, an |
91 // empty string otherwise | 92 // empty string otherwise |
92 virtual std::string CreateChannel() = 0; | 93 virtual std::string CreateChannel() = 0; |
93 | 94 |
94 // Returns true iff the IPC channel is currently being opened; | 95 // Returns true iff the IPC channel is currently being opened; |
95 virtual bool IsChannelOpening() = 0; | 96 virtual bool IsChannelOpening() = 0; |
96 | 97 |
97 // Adds an IPC message filter. A reference will be kept to the filter. | 98 // Adds an IPC message filter. A reference will be kept to the filter. |
98 virtual void AddFilter(IPC::MessageFilter* filter) = 0; | 99 virtual void AddFilter(IPC::MessageFilter* filter) = 0; |
99 | 100 |
| 101 // Notifies the child process being launched |
| 102 virtual void OnProcessLaunched(base::ProcessHandle process) = 0; |
| 103 |
100 #if defined(OS_POSIX) | 104 #if defined(OS_POSIX) |
101 // See IPC::Channel::TakeClientFileDescriptor. | 105 // See IPC::Channel::TakeClientFileDescriptor. |
102 virtual base::ScopedFD TakeClientFileDescriptor() = 0; | 106 virtual base::ScopedFD TakeClientFileDescriptor() = 0; |
103 #endif | 107 #endif |
104 }; | 108 }; |
105 | 109 |
106 }; // namespace content | 110 }; // namespace content |
107 | 111 |
108 #endif // CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ | 112 #endif // CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ |
OLD | NEW |