Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: content/public/common/child_process_host.h

Issue 2680973006: Mojo EDK: Add safe process connection API (Closed)
Patch Set: . Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/public/common/BUILD.gn ('k') | content/renderer/render_thread_impl_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ipc/ipc_channel_proxy.h" 13 #include "ipc/ipc_channel_proxy.h"
14 #include "mojo/edk/embedder/pending_process_connection.h"
14 15
15 namespace base { 16 namespace base {
16 class FilePath; 17 class FilePath;
17 } 18 }
18 19
19 namespace IPC { 20 namespace IPC {
20 class MessageFilter; 21 class MessageFilter;
21 } 22 }
22 23
23 namespace service_manager { 24 namespace service_manager {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 79
79 // Send the shutdown message to the child process. 80 // Send the shutdown message to the child process.
80 // Does not check with the delegate's CanShutdown. 81 // Does not check with the delegate's CanShutdown.
81 virtual void ForceShutdown() = 0; 82 virtual void ForceShutdown() = 0;
82 83
83 // 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
84 // succeeded, or an empty string on failure. 85 // succeeded, or an empty string on failure.
85 // 86 //
86 // DEPRECATED: Don't use this. Instead implement GetRemoteInterfaces() in the 87 // DEPRECATED: Don't use this. Instead implement GetRemoteInterfaces() in the
87 // delegate and use the CreateChannelMojo() version below. 88 // delegate and use the CreateChannelMojo() version below.
88 virtual std::string CreateChannelMojo(const std::string& child_token) = 0; 89 virtual std::string CreateChannelMojo(
90 mojo::edk::PendingProcessConnection* connection) = 0;
89 91
90 // Creates the IPC channel over a Mojo message pipe. The pipe connection is 92 // Creates the IPC channel over a Mojo message pipe. The pipe connection is
91 // brokered through the Service Manager like any other service connection. 93 // brokered through the Service Manager like any other service connection.
92 virtual void CreateChannelMojo() = 0; 94 virtual void CreateChannelMojo() = 0;
93 95
94 // Returns true iff the IPC channel is currently being opened; 96 // Returns true iff the IPC channel is currently being opened;
95 virtual bool IsChannelOpening() = 0; 97 virtual bool IsChannelOpening() = 0;
96 98
97 // Adds an IPC message filter. A reference will be kept to the filter. 99 // Adds an IPC message filter. A reference will be kept to the filter.
98 virtual void AddFilter(IPC::MessageFilter* filter) = 0; 100 virtual void AddFilter(IPC::MessageFilter* filter) = 0;
99 101
100 // Returns the service_manager::InterfaceProvider the process host can use to 102 // Returns the service_manager::InterfaceProvider the process host can use to
101 // bind 103 // bind
102 // interfaces exposed to it from the child. 104 // interfaces exposed to it from the child.
103 virtual service_manager::InterfaceProvider* GetRemoteInterfaces() = 0; 105 virtual service_manager::InterfaceProvider* GetRemoteInterfaces() = 0;
104 }; 106 };
105 107
106 }; // namespace content 108 }; // namespace content
107 109
108 #endif // CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_ 110 #endif // CONTENT_PUBLIC_COMMON_CHILD_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « content/public/common/BUILD.gn ('k') | content/renderer/render_thread_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698