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

Unified Diff: mojo/edk/system/dispatcher.h

Issue 1941883002: Move the Dispatcher::EntrypointClass enum out of Dispatcher to its own file. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/BUILD.gn ('k') | mojo/edk/system/entrypoint_class.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/dispatcher.h
diff --git a/mojo/edk/system/dispatcher.h b/mojo/edk/system/dispatcher.h
index e21a6509a500868b8013b3365cbf716d4f045025..f22765b8b6881c2b1a223a9c2761ffff82980994 100644
--- a/mojo/edk/system/dispatcher.h
+++ b/mojo/edk/system/dispatcher.h
@@ -13,6 +13,7 @@
#include <vector>
#include "mojo/edk/platform/scoped_platform_handle.h"
+#include "mojo/edk/system/entrypoint_class.h"
#include "mojo/edk/system/handle_signals_state.h"
#include "mojo/edk/system/memory.h"
#include "mojo/edk/util/mutex.h"
@@ -74,37 +75,16 @@ class Dispatcher : public util::RefCountedThreadSafe<Dispatcher> {
PLATFORM_HANDLE = -1
};
- // Classes of "entrypoints"/"syscalls": Each dispatcher should support entire
- // classes of methods (and if they don't support a given class, they should
- // return |MOJO_RESULT_INVALID_ARGUMENT| for all the methods in that class).
- // Warning: A method may be called even if |SupportsEntrypointClass()|
- // indicates that the method's class is not supported (see below).
- enum class EntrypointClass {
- // |ReadMessage()|, |WriteMessage()|:
- MESSAGE_PIPE,
-
- // |SetDataPipeProducerOptions()|, |GetDataPipeProducerOptions()|,
- // |WriteData()|, |BeginWriteData()|, |EndWriteData()|:
- DATA_PIPE_PRODUCER,
-
- // |SetDataPipeConsumerOptions()|, |GetDataPipeConsumerOptions()|,
- // |ReadData()|, |BeginReadData()|, |EndReadData()|:
- DATA_PIPE_CONSUMER,
-
- // |DuplicateBufferHandle()|, |GetBufferInformation()|, |MapBuffer()|:
- BUFFER,
- };
-
// Gets the type of the dispatcher; see |Type| above.
virtual Type GetType() const = 0;
- // Gets whether the given entrypoint class is supported; see |EntrypointClass|
- // above. This is ONLY called when a rights check has failed, to determine
- // whether |MOJO_RESULT_PERMISSION_DENIED| (if the entrypoint class is
- // supported) or |MOJO_RESULT_INVALID_ARGUMENT| (if not) should be returned.
- // In the case that the rights check passes, |Core| will proceed immediately
- // to call the method (so if the method is not supported, it must still return
- // |MOJO_RESULT_INVALID_ARGUMENT|).
+ // Gets whether the given entrypoint class is supported; see the definition of
+ // |EntrypointClass|. This is ONLY called when a rights check has failed, to
+ // determine whether |MOJO_RESULT_PERMISSION_DENIED| (if the entrypoint class
+ // is supported) or |MOJO_RESULT_INVALID_ARGUMENT| (if not) should be
+ // returned. In the case that the rights check passes, |Core| will proceed
+ // immediately to call the method (so if the method is not supported, it must
+ // still return |MOJO_RESULT_INVALID_ARGUMENT|).
virtual bool SupportsEntrypointClass(
EntrypointClass entrypoint_class) const = 0;
« no previous file with comments | « mojo/edk/system/BUILD.gn ('k') | mojo/edk/system/entrypoint_class.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698