| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_WAIT_SET_DISPATCHER_H_ | 5 #ifndef MOJO_EDK_SYSTEM_WAIT_SET_DISPATCHER_H_ |
| 6 #define MOJO_EDK_SYSTEM_WAIT_SET_DISPATCHER_H_ | 6 #define MOJO_EDK_SYSTEM_WAIT_SET_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include "mojo/edk/system/dispatcher.h" | 8 #include "mojo/edk/system/dispatcher.h" |
| 9 #include "mojo/public/cpp/system/macros.h" | 9 #include "mojo/public/cpp/system/macros.h" |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // Validates and/or sets default options for |MojoCreateWaitSetOptions|. If | 31 // Validates and/or sets default options for |MojoCreateWaitSetOptions|. If |
| 32 // non-null, |in_options| must point to a struct of at least | 32 // non-null, |in_options| must point to a struct of at least |
| 33 // |in_options->struct_size| bytes. |out_options| must point to a (current) | 33 // |in_options->struct_size| bytes. |out_options| must point to a (current) |
| 34 // |MojoCreateWaitSetOptions| and will be entirely overwritten on success (it | 34 // |MojoCreateWaitSetOptions| and will be entirely overwritten on success (it |
| 35 // may be partly overwritten on failure). | 35 // may be partly overwritten on failure). |
| 36 static MojoResult ValidateCreateOptions( | 36 static MojoResult ValidateCreateOptions( |
| 37 UserPointer<const MojoCreateWaitSetOptions> in_options, | 37 UserPointer<const MojoCreateWaitSetOptions> in_options, |
| 38 MojoCreateWaitSetOptions* out_options); | 38 MojoCreateWaitSetOptions* out_options); |
| 39 | 39 |
| 40 // Like |ValidateCreateOptions()|, but for |MojoWaitSetAddOptions|. |
| 41 static MojoResult ValidateWaitSetAddOptions( |
| 42 UserPointer<const MojoWaitSetAddOptions> in_options, |
| 43 MojoWaitSetAddOptions* out_options); |
| 44 |
| 40 static util::RefPtr<WaitSetDispatcher> Create( | 45 static util::RefPtr<WaitSetDispatcher> Create( |
| 41 const MojoCreateWaitSetOptions& /*validated_options*/) { | 46 const MojoCreateWaitSetOptions& /*validated_options*/) { |
| 42 return AdoptRef(new WaitSetDispatcher()); | 47 return AdoptRef(new WaitSetDispatcher()); |
| 43 } | 48 } |
| 44 | 49 |
| 45 // |Dispatcher| public methods: | 50 // |Dispatcher| public methods: |
| 46 Type GetType() const override; | 51 Type GetType() const override; |
| 47 bool SupportsEntrypointClass(EntrypointClass entrypoint_class) const override; | 52 bool SupportsEntrypointClass(EntrypointClass entrypoint_class) const override; |
| 48 | 53 |
| 49 private: | 54 private: |
| (...skipping 14 matching lines...) Expand all Loading... |
| 64 UserPointer<MojoWaitSetResult> results, | 69 UserPointer<MojoWaitSetResult> results, |
| 65 UserPointer<uint32_t> max_results) override; | 70 UserPointer<uint32_t> max_results) override; |
| 66 | 71 |
| 67 MOJO_DISALLOW_COPY_AND_ASSIGN(WaitSetDispatcher); | 72 MOJO_DISALLOW_COPY_AND_ASSIGN(WaitSetDispatcher); |
| 68 }; | 73 }; |
| 69 | 74 |
| 70 } // namespace system | 75 } // namespace system |
| 71 } // namespace mojo | 76 } // namespace mojo |
| 72 | 77 |
| 73 #endif // MOJO_EDK_SYSTEM_WAIT_SET_DISPATCHER_H_ | 78 #endif // MOJO_EDK_SYSTEM_WAIT_SET_DISPATCHER_H_ |
| OLD | NEW |