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

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

Issue 2043713004: Mojo: Add NotifyBadMessage API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 void SetIOTaskRunner(scoped_refptr<base::TaskRunner> io_task_runner); 47 void SetIOTaskRunner(scoped_refptr<base::TaskRunner> io_task_runner);
48 48
49 // Retrieves the NodeController for the current process. 49 // Retrieves the NodeController for the current process.
50 NodeController* GetNodeController(); 50 NodeController* GetNodeController();
51 51
52 scoped_refptr<Dispatcher> GetDispatcher(MojoHandle handle); 52 scoped_refptr<Dispatcher> GetDispatcher(MojoHandle handle);
53 53
54 // Called in the parent process any time a new child is launched. 54 // Called in the parent process any time a new child is launched.
55 void AddChild(base::ProcessHandle process_handle, 55 void AddChild(base::ProcessHandle process_handle,
56 ScopedPlatformHandle platform_handle, 56 ScopedPlatformHandle platform_handle,
57 const std::string& child_token); 57 const std::string& child_token,
58 const base::Closure& bad_message_callback);
58 59
59 // Called in the parent process when a child process fails to launch. 60 // Called in the parent process when a child process fails to launch.
60 void ChildLaunchFailed(const std::string& child_token); 61 void ChildLaunchFailed(const std::string& child_token);
61 62
62 // Called in a child process exactly once during early initialization. 63 // Called in a child process exactly once during early initialization.
63 void InitChild(ScopedPlatformHandle platform_handle); 64 void InitChild(ScopedPlatformHandle platform_handle);
64 65
65 // Creates a message pipe endpoint connected to an endpoint in a remote 66 // Creates a message pipe endpoint connected to an endpoint in a remote
66 // embedder. |platform_handle| is used as a channel to negotiate the 67 // embedder. |platform_handle| is used as a channel to negotiate the
67 // connection. 68 // connection.
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 MojoHandle* handles, 194 MojoHandle* handles,
194 uint32_t* num_handles, 195 uint32_t* num_handles,
195 MojoReadMessageFlags flags); 196 MojoReadMessageFlags flags);
196 MojoResult ReadMessageNew(MojoHandle message_pipe_handle, 197 MojoResult ReadMessageNew(MojoHandle message_pipe_handle,
197 MojoMessageHandle* message, 198 MojoMessageHandle* message,
198 uint32_t* num_bytes, 199 uint32_t* num_bytes,
199 MojoHandle* handles, 200 MojoHandle* handles,
200 uint32_t* num_handles, 201 uint32_t* num_handles,
201 MojoReadMessageFlags flags); 202 MojoReadMessageFlags flags);
202 MojoResult FuseMessagePipes(MojoHandle handle0, MojoHandle handle1); 203 MojoResult FuseMessagePipes(MojoHandle handle0, MojoHandle handle1);
204 MojoResult NotifyBadMessage(MojoMessageHandle message);
203 205
204 // These methods correspond to the API functions defined in 206 // These methods correspond to the API functions defined in
205 // "mojo/public/c/system/data_pipe.h": 207 // "mojo/public/c/system/data_pipe.h":
206 MojoResult CreateDataPipe( 208 MojoResult CreateDataPipe(
207 const MojoCreateDataPipeOptions* options, 209 const MojoCreateDataPipeOptions* options,
208 MojoHandle* data_pipe_producer_handle, 210 MojoHandle* data_pipe_producer_handle,
209 MojoHandle* data_pipe_consumer_handle); 211 MojoHandle* data_pipe_consumer_handle);
210 MojoResult WriteData(MojoHandle data_pipe_producer_handle, 212 MojoResult WriteData(MojoHandle data_pipe_producer_handle,
211 const void* elements, 213 const void* elements,
212 uint32_t* num_bytes, 214 uint32_t* num_bytes,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 base::Lock mapping_table_lock_; // Protects |mapping_table_|. 299 base::Lock mapping_table_lock_; // Protects |mapping_table_|.
298 MappingTable mapping_table_; 300 MappingTable mapping_table_;
299 301
300 DISALLOW_COPY_AND_ASSIGN(Core); 302 DISALLOW_COPY_AND_ASSIGN(Core);
301 }; 303 };
302 304
303 } // namespace edk 305 } // namespace edk
304 } // namespace mojo 306 } // namespace mojo
305 307
306 #endif // MOJO_EDK_SYSTEM_CORE_H_ 308 #endif // MOJO_EDK_SYSTEM_CORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698