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

Side by Side Diff: mojo/edk/system/core.h

Issue 1675603002: [mojo-edk] Simplify multiprocess pipe bootstrap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SYSTEM_CORE_H_ 5 #ifndef MOJO_EDK_SYSTEM_CORE_H_
6 #define MOJO_EDK_SYSTEM_CORE_H_ 6 #define MOJO_EDK_SYSTEM_CORE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 scoped_refptr<Dispatcher> GetDispatcher(MojoHandle handle); 46 scoped_refptr<Dispatcher> GetDispatcher(MojoHandle handle);
47 47
48 // Called in the parent process any time a new child is launched. 48 // Called in the parent process any time a new child is launched.
49 void AddChild(base::ProcessHandle process_handle, 49 void AddChild(base::ProcessHandle process_handle,
50 ScopedPlatformHandle platform_handle); 50 ScopedPlatformHandle platform_handle);
51 51
52 // Called in a child process exactly once during early initialization. 52 // Called in a child process exactly once during early initialization.
53 void InitChild(ScopedPlatformHandle platform_handle); 53 void InitChild(ScopedPlatformHandle platform_handle);
54 54
55 // This creates a message pipe endpoint connected to an endpoint in a remote 55 // Creates a message pipe endpoint connected to an an endpoint in a remote
Anand Mistry (off Chromium) 2016/02/08 06:23:21 "an an"
Ken Rockot(use gerrit already) 2016/02/08 23:20:56 done
56 // embedder. |platform_handle| is used as a channel to negotiate the 56 // embedder. |platform_handle| is used as a channel to negotiate the
57 // connection. This is only here to facilitate legacy embedder code. See 57 // connection.
58 // mojo::edk::CreateMessagePipe in mojo/edk/embedder/embedder.h. 58 ScopedMessagePipeHandle CreateMessagePipe(
59 void CreateMessagePipe( 59 ScopedPlatformHandle platform_handle);
60 ScopedPlatformHandle platform_handle,
61 const base::Callback<void(ScopedMessagePipeHandle)>& callback);
62 60
63 // Creates a message pipe endpoint associated with |token|, which a child 61 // Creates a message pipe endpoint associated with |token|, which a child
64 // holding the token can later locate and connect to. 62 // holding the token can later locate and connect to.
65 void CreateParentMessagePipe( 63 void CreateParentMessagePipe(
66 const std::string& token, 64 const std::string& token,
67 const base::Callback<void(ScopedMessagePipeHandle)>& callback); 65 const base::Callback<void(ScopedMessagePipeHandle)>& callback);
68 66
69 // Creates a message pipe endpoint associated with |token|, which will be 67 // Creates a message pipe endpoint associated with |token|, which will be
70 // passed to the parent in order to find an associated remote port and connect 68 // passed to the parent in order to find an associated remote port and connect
71 // to it. 69 // to it.
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 base::Lock mapping_table_lock_; // Protects |mapping_table_|. 226 base::Lock mapping_table_lock_; // Protects |mapping_table_|.
229 MappingTable mapping_table_; 227 MappingTable mapping_table_;
230 228
231 DISALLOW_COPY_AND_ASSIGN(Core); 229 DISALLOW_COPY_AND_ASSIGN(Core);
232 }; 230 };
233 231
234 } // namespace edk 232 } // namespace edk
235 } // namespace mojo 233 } // namespace mojo
236 234
237 #endif // MOJO_EDK_SYSTEM_CORE_H_ 235 #endif // MOJO_EDK_SYSTEM_CORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698