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

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

Issue 1957713003: EDK: Remove Core::GetDispatcher(). (Closed) Base URL: https://github.com/domokit/mojo.git@work789_edk_handle_table_14-x-work788_edk_handle_13.9-x-work787_edk_handle_13.8
Patch Set: Created 4 years, 7 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <functional> 10 #include <functional>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // the handle value for it. Returns |MOJO_HANDLE_INVALID| on failure, namely 55 // the handle value for it. Returns |MOJO_HANDLE_INVALID| on failure, namely
56 // if the handle table is full. 56 // if the handle table is full.
57 MojoHandle AddHandle(Handle&& h); 57 MojoHandle AddHandle(Handle&& h);
58 58
59 // Gets the handle for the given handle value. On success, returns 59 // Gets the handle for the given handle value. On success, returns
60 // |MOJO_RESULT_OK| (and sets |*h|). On failure, returns an appropriate result 60 // |MOJO_RESULT_OK| (and sets |*h|). On failure, returns an appropriate result
61 // (and leaves |*h| alone), namely |MOJO_RESULT_INVALID_ARGUMENT| if the 61 // (and leaves |*h| alone), namely |MOJO_RESULT_INVALID_ARGUMENT| if the
62 // handle value is invalid or |MOJO_RESULT_BUSY| if the handle is marked as 62 // handle value is invalid or |MOJO_RESULT_BUSY| if the handle is marked as
63 // busy. 63 // busy.
64 MojoResult GetHandle(MojoHandle handle, Handle* h); 64 MojoResult GetHandle(MojoHandle handle, Handle* h);
65 // TODO(vtl): Remove this.
66 MojoResult GetDispatcher(MojoHandle handle,
67 util::RefPtr<Dispatcher>* dispatcher);
68 65
69 // TODO(vtl): Convert this to |GetAndRemoveHandle()|. 66 // TODO(vtl): Convert this to |GetAndRemoveHandle()|.
70 // Like |GetDispatcher()|, but on success also removes the handle from the 67 // Like |GetDispatcher()|, but on success also removes the handle from the
71 // handle table. 68 // handle table.
72 MojoResult GetAndRemoveDispatcher(MojoHandle handle, 69 MojoResult GetAndRemoveDispatcher(MojoHandle handle,
73 util::RefPtr<Dispatcher>* dispatcher); 70 util::RefPtr<Dispatcher>* dispatcher);
74 71
75 // Gets the dispatcher for the given handle value, which must have (all of) 72 // Gets the dispatcher for the given handle value, which must have (all of)
76 // the rights in |required_handle_rights|. 73 // the rights in |required_handle_rights|.
77 // 74 //
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 util::Mutex mapping_table_mutex_; 236 util::Mutex mapping_table_mutex_;
240 MappingTable mapping_table_ MOJO_GUARDED_BY(mapping_table_mutex_); 237 MappingTable mapping_table_ MOJO_GUARDED_BY(mapping_table_mutex_);
241 238
242 MOJO_DISALLOW_COPY_AND_ASSIGN(Core); 239 MOJO_DISALLOW_COPY_AND_ASSIGN(Core);
243 }; 240 };
244 241
245 } // namespace system 242 } // namespace system
246 } // namespace mojo 243 } // namespace mojo
247 244
248 #endif // MOJO_EDK_SYSTEM_CORE_H_ 245 #endif // MOJO_EDK_SYSTEM_CORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698