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

Side by Side Diff: mojo/edk/embedder/embedder.h

Issue 2466433002: Add mojo::edk::ClosePeerConnection. (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | mojo/edk/embedder/embedder.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 MOJO_EDK_EMBEDDER_EMBEDDER_H_ 5 #ifndef MOJO_EDK_EMBEDDER_EMBEDDER_H_
6 #define MOJO_EDK_EMBEDDER_EMBEDDER_H_ 6 #define MOJO_EDK_EMBEDDER_EMBEDDER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // PlatformChannelPair for details. 70 // PlatformChannelPair for details.
71 MOJO_SYSTEM_IMPL_EXPORT void SetParentPipeHandleFromCommandLine(); 71 MOJO_SYSTEM_IMPL_EXPORT void SetParentPipeHandleFromCommandLine();
72 72
73 // Called to connect to a peer process. This should be called only if there 73 // Called to connect to a peer process. This should be called only if there
74 // is no common ancestor for the processes involved within this mojo system. 74 // is no common ancestor for the processes involved within this mojo system.
75 // Both processes must call this function, each passing one end of a platform 75 // Both processes must call this function, each passing one end of a platform
76 // channel. This returns one end of a message pipe to each process. 76 // channel. This returns one end of a message pipe to each process.
77 MOJO_SYSTEM_IMPL_EXPORT ScopedMessagePipeHandle 77 MOJO_SYSTEM_IMPL_EXPORT ScopedMessagePipeHandle
78 ConnectToPeerProcess(ScopedPlatformHandle pipe); 78 ConnectToPeerProcess(ScopedPlatformHandle pipe);
79 79
80 // Called to connect to a peer process. This should be called only if there
81 // is no common ancestor for the processes involved within this mojo system.
82 // Both processes must call this function, each passing one end of a platform
83 // channel. This returns one end of a message pipe to each process. |peer_token|
84 // may be passed to ClosePeerConnection() to close the connection.
85 MOJO_SYSTEM_IMPL_EXPORT ScopedMessagePipeHandle
86 ConnectToPeerProcess(ScopedPlatformHandle pipe, const std::string& peer_token);
87
88 // Closes a connection to a peer process created by ConnectToPeerProcess()
89 // where the same |peer_token| was used.
90 MOJO_SYSTEM_IMPL_EXPORT void ClosePeerConnection(const std::string& peer_token);
91
80 // Must be called first, or just after setting configuration parameters, to 92 // Must be called first, or just after setting configuration parameters, to
81 // initialize the (global, singleton) system. 93 // initialize the (global, singleton) system.
82 MOJO_SYSTEM_IMPL_EXPORT void Init(); 94 MOJO_SYSTEM_IMPL_EXPORT void Init();
83 95
84 // Sets a default callback to invoke when an internal error is reported but 96 // Sets a default callback to invoke when an internal error is reported but
85 // cannot be associated with a specific child process. 97 // cannot be associated with a specific child process.
86 MOJO_SYSTEM_IMPL_EXPORT void SetDefaultProcessErrorCallback( 98 MOJO_SYSTEM_IMPL_EXPORT void SetDefaultProcessErrorCallback(
87 const ProcessErrorCallback& callback); 99 const ProcessErrorCallback& callback);
88 100
89 // Basic functions ------------------------------------------------------------- 101 // Basic functions -------------------------------------------------------------
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 // 210 //
199 // Default property values: 211 // Default property values:
200 // |MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED| - true 212 // |MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED| - true
201 MOJO_SYSTEM_IMPL_EXPORT MojoResult SetProperty(MojoPropertyType type, 213 MOJO_SYSTEM_IMPL_EXPORT MojoResult SetProperty(MojoPropertyType type,
202 const void* value); 214 const void* value);
203 215
204 } // namespace edk 216 } // namespace edk
205 } // namespace mojo 217 } // namespace mojo
206 218
207 #endif // MOJO_EDK_EMBEDDER_EMBEDDER_H_ 219 #endif // MOJO_EDK_EMBEDDER_EMBEDDER_H_
OLDNEW
« no previous file with comments | « no previous file | mojo/edk/embedder/embedder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698