| 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" |
| 11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "content/public/common/bind_interface_helpers.h" |
| 13 #include "ipc/ipc_channel_proxy.h" | 14 #include "ipc/ipc_channel_proxy.h" |
| 14 #include "mojo/edk/embedder/pending_process_connection.h" | 15 #include "mojo/edk/embedder/pending_process_connection.h" |
| 15 | 16 |
| 16 namespace base { | 17 namespace base { |
| 17 class FilePath; | 18 class FilePath; |
| 18 } | 19 } |
| 19 | 20 |
| 20 namespace IPC { | 21 namespace IPC { |
| 21 class MessageFilter; | 22 class MessageFilter; |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace service_manager { | |
| 25 class InterfaceProvider; | |
| 26 } | |
| 27 | |
| 28 namespace content { | 25 namespace content { |
| 29 | 26 |
| 30 class ChildProcessHostDelegate; | 27 class ChildProcessHostDelegate; |
| 31 | 28 |
| 32 // This represents a non-browser process. This can include traditional child | 29 // This represents a non-browser process. This can include traditional child |
| 33 // processes like plugins, or an embedder could even use this for long lived | 30 // processes like plugins, or an embedder could even use this for long lived |
| 34 // processes that run independent of the browser process. | 31 // processes that run independent of the browser process. |
| 35 class CONTENT_EXPORT ChildProcessHost : public IPC::Sender { | 32 class CONTENT_EXPORT ChildProcessHost : public IPC::Sender { |
| 36 public: | 33 public: |
| 37 ~ChildProcessHost() override {} | 34 ~ChildProcessHost() override {} |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // Creates the IPC channel over a Mojo message pipe. The pipe connection is | 84 // Creates the IPC channel over a Mojo message pipe. The pipe connection is |
| 88 // brokered through the Service Manager like any other service connection. | 85 // brokered through the Service Manager like any other service connection. |
| 89 virtual void CreateChannelMojo() = 0; | 86 virtual void CreateChannelMojo() = 0; |
| 90 | 87 |
| 91 // Returns true iff the IPC channel is currently being opened; | 88 // Returns true iff the IPC channel is currently being opened; |
| 92 virtual bool IsChannelOpening() = 0; | 89 virtual bool IsChannelOpening() = 0; |
| 93 | 90 |
| 94 // Adds an IPC message filter. A reference will be kept to the filter. | 91 // Adds an IPC message filter. A reference will be kept to the filter. |
| 95 virtual void AddFilter(IPC::MessageFilter* filter) = 0; | 92 virtual void AddFilter(IPC::MessageFilter* filter) = 0; |
| 96 | 93 |
| 97 // Returns the service_manager::InterfaceProvider the process host can use to | 94 // Bind an interface exposed by the child process. |
| 98 // bind | 95 virtual void BindInterface(const std::string& interface_name, |
| 99 // interfaces exposed to it from the child. | 96 mojo::ScopedMessagePipeHandle interface_pipe) = 0; |
| 100 virtual service_manager::InterfaceProvider* GetRemoteInterfaces() = 0; | |
| 101 }; | 97 }; |
| 102 | 98 |
| 103 }; // namespace content | 99 }; // namespace content |
| 104 | 100 |
| 105 #endif // CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ | 101 #endif // CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ |
| OLD | NEW |