| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SHARED_BUFFER_DISPATCHER_H_ | 5 #ifndef MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_ |
| 6 #define MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_ | 6 #define MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <utility> | 11 #include <utility> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "mojo/edk/embedder/platform_handle_vector.h" | 14 #include "mojo/edk/embedder/platform_handle_vector.h" |
| 15 #include "mojo/edk/embedder/platform_shared_buffer.h" | 15 #include "mojo/edk/embedder/platform_shared_buffer.h" |
| 16 #include "mojo/edk/embedder/scoped_platform_handle.h" | 16 #include "mojo/edk/embedder/scoped_platform_handle.h" |
| 17 #include "mojo/edk/system/dispatcher.h" | 17 #include "mojo/edk/system/dispatcher.h" |
| 18 #include "mojo/edk/system/system_impl_export.h" | 18 #include "mojo/edk/system/system_impl_export.h" |
| 19 | 19 |
| 20 namespace mojo { | 20 namespace mojo { |
| 21 | 21 |
| 22 namespace edk { | 22 namespace edk { |
| 23 class NodeController; | 23 class NodeController; |
| 24 class PlatformSupport; | |
| 25 | 24 |
| 26 class MOJO_SYSTEM_IMPL_EXPORT SharedBufferDispatcher final : public Dispatcher { | 25 class MOJO_SYSTEM_IMPL_EXPORT SharedBufferDispatcher final : public Dispatcher { |
| 27 public: | 26 public: |
| 28 // The default options to use for |MojoCreateSharedBuffer()|. (Real uses | 27 // The default options to use for |MojoCreateSharedBuffer()|. (Real uses |
| 29 // should obtain this via |ValidateCreateOptions()| with a null |in_options|; | 28 // should obtain this via |ValidateCreateOptions()| with a null |in_options|; |
| 30 // this is exposed directly for testing convenience.) | 29 // this is exposed directly for testing convenience.) |
| 31 static const MojoCreateSharedBufferOptions kDefaultCreateOptions; | 30 static const MojoCreateSharedBufferOptions kDefaultCreateOptions; |
| 32 | 31 |
| 33 // Validates and/or sets default options for |MojoCreateSharedBufferOptions|. | 32 // Validates and/or sets default options for |MojoCreateSharedBufferOptions|. |
| 34 // If non-null, |in_options| must point to a struct of at least | 33 // If non-null, |in_options| must point to a struct of at least |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 118 |
| 120 scoped_refptr<PlatformSharedBuffer> shared_buffer_; | 119 scoped_refptr<PlatformSharedBuffer> shared_buffer_; |
| 121 | 120 |
| 122 DISALLOW_COPY_AND_ASSIGN(SharedBufferDispatcher); | 121 DISALLOW_COPY_AND_ASSIGN(SharedBufferDispatcher); |
| 123 }; | 122 }; |
| 124 | 123 |
| 125 } // namespace edk | 124 } // namespace edk |
| 126 } // namespace mojo | 125 } // namespace mojo |
| 127 | 126 |
| 128 #endif // MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_ | 127 #endif // MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_ |
| OLD | NEW |