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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 virtual void ForceShutdown() = 0; | 82 virtual void ForceShutdown() = 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 // | 86 // |
87 // DEPRECATED: Don't use this. Instead implement GetRemoteInterfaces() in the | 87 // DEPRECATED: Don't use this. Instead implement GetRemoteInterfaces() in the |
88 // delegate and use the CreateChannelMojo() version below. | 88 // delegate and use the CreateChannelMojo() version below. |
89 virtual std::string CreateChannelMojo(const std::string& child_token) = 0; | 89 virtual std::string CreateChannelMojo(const std::string& child_token) = 0; |
90 | 90 |
91 // Creates the IPC channel over a Mojo message pipe. The pipe connection is | 91 // Creates the IPC channel over a Mojo message pipe. The pipe connection is |
92 // brokered through the shell like any other service connection. | 92 // brokered through the Service Manager like any other service connection. |
93 virtual void CreateChannelMojo() = 0; | 93 virtual void CreateChannelMojo() = 0; |
94 | 94 |
95 // Returns true iff the IPC channel is currently being opened; | 95 // Returns true iff the IPC channel is currently being opened; |
96 virtual bool IsChannelOpening() = 0; | 96 virtual bool IsChannelOpening() = 0; |
97 | 97 |
98 // 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. |
99 virtual void AddFilter(IPC::MessageFilter* filter) = 0; | 99 virtual void AddFilter(IPC::MessageFilter* filter) = 0; |
100 | 100 |
101 // Returns the service_manager::InterfaceProvider the process host can use to | 101 // Returns the service_manager::InterfaceProvider the process host can use to |
102 // bind | 102 // bind |
103 // interfaces exposed to it from the child. | 103 // interfaces exposed to it from the child. |
104 virtual service_manager::InterfaceProvider* GetRemoteInterfaces() = 0; | 104 virtual service_manager::InterfaceProvider* GetRemoteInterfaces() = 0; |
105 | 105 |
106 #if defined(OS_POSIX) | 106 #if defined(OS_POSIX) |
107 // See IPC::Channel::TakeClientFileDescriptor. | 107 // See IPC::Channel::TakeClientFileDescriptor. |
108 virtual base::ScopedFD TakeClientFileDescriptor() = 0; | 108 virtual base::ScopedFD TakeClientFileDescriptor() = 0; |
109 #endif | 109 #endif |
110 }; | 110 }; |
111 | 111 |
112 }; // namespace content | 112 }; // namespace content |
113 | 113 |
114 #endif // CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ | 114 #endif // CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ |
OLD | NEW |