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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/files/scoped_file.h" | 10 #include "base/files/scoped_file.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 virtual void ForceShutdown() = 0; | 78 virtual void ForceShutdown() = 0; |
79 | 79 |
80 // Creates the IPC channel. Returns the channel id if it succeeded, an | 80 // Creates the IPC channel. Returns the channel id if it succeeded, an |
81 // empty string otherwise | 81 // empty string otherwise |
82 virtual std::string CreateChannel() = 0; | 82 virtual std::string CreateChannel() = 0; |
83 | 83 |
84 // Creates the IPC channel on top of Mojo. Returns the Mojo channel token if | 84 // Creates the IPC channel on top of Mojo. Returns the Mojo channel token if |
85 // succeeded, or an empty string on failure. | 85 // succeeded, or an empty string on failure. |
86 virtual std::string CreateChannelMojo(const std::string& child_token) = 0; | 86 virtual std::string CreateChannelMojo(const std::string& child_token) = 0; |
87 | 87 |
| 88 // Creates the IPC channel on top of Mojo using |handle| as the bootstrap |
| 89 // factory. Returns true if creation/initialization succeeded. |
| 90 virtual bool CreateChannelMojoWithBootstrap( |
| 91 mojo::ScopedMessagePipeHandle handle) = 0; |
| 92 |
88 // Returns true iff the IPC channel is currently being opened; | 93 // Returns true iff the IPC channel is currently being opened; |
89 virtual bool IsChannelOpening() = 0; | 94 virtual bool IsChannelOpening() = 0; |
90 | 95 |
91 // 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. |
92 virtual void AddFilter(IPC::MessageFilter* filter) = 0; | 97 virtual void AddFilter(IPC::MessageFilter* filter) = 0; |
93 | 98 |
94 #if defined(OS_POSIX) | 99 #if defined(OS_POSIX) |
95 // See IPC::Channel::TakeClientFileDescriptor. | 100 // See IPC::Channel::TakeClientFileDescriptor. |
96 virtual base::ScopedFD TakeClientFileDescriptor() = 0; | 101 virtual base::ScopedFD TakeClientFileDescriptor() = 0; |
97 #endif | 102 #endif |
98 }; | 103 }; |
99 | 104 |
100 }; // namespace content | 105 }; // namespace content |
101 | 106 |
102 #endif // CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ | 107 #endif // CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ |
OLD | NEW |