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_PULIC_COMMON_CHILD_PROCESS_HOST_H_ | 5 #ifndef CONTENT_PULIC_COMMON_CHILD_PROCESS_HOST_H_ |
6 #define CONTENT_PULIC_COMMON_CHILD_PROCESS_HOST_H_ | 6 #define CONTENT_PULIC_COMMON_CHILD_PROCESS_HOST_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "ipc/ipc_channel_proxy.h" | 10 #include "ipc/ipc_channel_proxy.h" |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 class FilePath; | 13 class FilePath; |
14 } | 14 } |
15 | 15 |
| 16 namespace IPC { |
| 17 class MessageFilter; |
| 18 } |
| 19 |
16 namespace content { | 20 namespace content { |
17 | 21 |
18 class ChildProcessHostDelegate; | 22 class ChildProcessHostDelegate; |
19 | 23 |
20 // This represents a non-browser process. This can include traditional child | 24 // This represents a non-browser process. This can include traditional child |
21 // processes like plugins, or an embedder could even use this for long lived | 25 // processes like plugins, or an embedder could even use this for long lived |
22 // processes that run independent of the browser process. | 26 // processes that run independent of the browser process. |
23 class CONTENT_EXPORT ChildProcessHost : public IPC::Sender { | 27 class CONTENT_EXPORT ChildProcessHost : public IPC::Sender { |
24 public: | 28 public: |
25 virtual ~ChildProcessHost() {} | 29 virtual ~ChildProcessHost() {} |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 virtual void ForceShutdown() = 0; | 87 virtual void ForceShutdown() = 0; |
84 | 88 |
85 // Creates the IPC channel. Returns the channel id if it succeeded, an | 89 // Creates the IPC channel. Returns the channel id if it succeeded, an |
86 // empty string otherwise | 90 // empty string otherwise |
87 virtual std::string CreateChannel() = 0; | 91 virtual std::string CreateChannel() = 0; |
88 | 92 |
89 // Returns true iff the IPC channel is currently being opened; | 93 // Returns true iff the IPC channel is currently being opened; |
90 virtual bool IsChannelOpening() = 0; | 94 virtual bool IsChannelOpening() = 0; |
91 | 95 |
92 // Adds an IPC message filter. A reference will be kept to the filter. | 96 // Adds an IPC message filter. A reference will be kept to the filter. |
93 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) = 0; | 97 virtual void AddFilter(IPC::MessageFilter* filter) = 0; |
94 | 98 |
95 #if defined(OS_POSIX) | 99 #if defined(OS_POSIX) |
96 // See IPC::Channel::TakeClientFileDescriptor. | 100 // See IPC::Channel::TakeClientFileDescriptor. |
97 virtual int TakeClientFileDescriptor() = 0; | 101 virtual int TakeClientFileDescriptor() = 0; |
98 #endif | 102 #endif |
99 }; | 103 }; |
100 | 104 |
101 }; // namespace content | 105 }; // namespace content |
102 | 106 |
103 #endif // CONTENT_PULIC_COMMON_CHILD_PROCESS_HOST_H_ | 107 #endif // CONTENT_PULIC_COMMON_CHILD_PROCESS_HOST_H_ |
OLD | NEW |