Index: mojo/edk/system/shared_buffer_dispatcher.h |
diff --git a/third_party/mojo/src/mojo/edk/system/shared_buffer_dispatcher.h b/mojo/edk/system/shared_buffer_dispatcher.h |
similarity index 83% |
copy from third_party/mojo/src/mojo/edk/system/shared_buffer_dispatcher.h |
copy to mojo/edk/system/shared_buffer_dispatcher.h |
index 1222e030c185364ce3347b229a2bdcaa9c230141..31570d6145bb9660a33ec0ac875993b62a0b7c52 100644 |
--- a/third_party/mojo/src/mojo/edk/system/shared_buffer_dispatcher.h |
+++ b/mojo/edk/system/shared_buffer_dispatcher.h |
@@ -13,11 +13,8 @@ |
namespace mojo { |
-namespace embedder { |
+namespace edk { |
class PlatformSupport; |
-} |
- |
-namespace system { |
// TODO(vtl): We derive from SimpleDispatcher, even though we don't currently |
// have anything that's waitable. I want to add a "transferrable" wait flag |
@@ -44,7 +41,7 @@ class MOJO_SYSTEM_IMPL_EXPORT SharedBufferDispatcher final |
// TODO(vtl): This should probably be made to return a scoped_refptr and have |
// a MojoResult out parameter instead. |
static MojoResult Create( |
- embedder::PlatformSupport* platform_support, |
+ PlatformSupport* platform_support, |
const MojoCreateSharedBufferOptions& validated_options, |
uint64_t num_bytes, |
scoped_refptr<SharedBufferDispatcher>* result); |
@@ -55,19 +52,18 @@ class MOJO_SYSTEM_IMPL_EXPORT SharedBufferDispatcher final |
// The "opposite" of |SerializeAndClose()|. (Typically this is called by |
// |Dispatcher::Deserialize()|.) |
static scoped_refptr<SharedBufferDispatcher> Deserialize( |
- Channel* channel, |
const void* source, |
size_t size, |
- embedder::PlatformHandleVector* platform_handles); |
+ PlatformHandleVector* platform_handles); |
private: |
static scoped_refptr<SharedBufferDispatcher> CreateInternal( |
- scoped_refptr<embedder::PlatformSharedBuffer> shared_buffer) { |
+ scoped_refptr<PlatformSharedBuffer> shared_buffer) { |
return make_scoped_refptr(new SharedBufferDispatcher(shared_buffer.Pass())); |
} |
explicit SharedBufferDispatcher( |
- scoped_refptr<embedder::PlatformSharedBuffer> shared_buffer); |
+ scoped_refptr<PlatformSharedBuffer> shared_buffer); |
~SharedBufferDispatcher() override; |
// Validates and/or sets default options for |
@@ -90,25 +86,20 @@ class MOJO_SYSTEM_IMPL_EXPORT SharedBufferDispatcher final |
uint64_t offset, |
uint64_t num_bytes, |
MojoMapBufferFlags flags, |
- scoped_ptr<embedder::PlatformSharedBufferMapping>* mapping) override; |
- void StartSerializeImplNoLock(Channel* channel, |
- size_t* max_size, |
- size_t* max_platform_handles) override |
- MOJO_NOT_THREAD_SAFE; |
+ scoped_ptr<PlatformSharedBufferMapping>* mapping) override; |
+ void StartSerializeImplNoLock(size_t* max_size, |
+ size_t* max_platform_handles) override; |
bool EndSerializeAndCloseImplNoLock( |
- Channel* channel, |
void* destination, |
size_t* actual_size, |
- embedder::PlatformHandleVector* platform_handles) override |
- MOJO_NOT_THREAD_SAFE; |
+ PlatformHandleVector* platform_handles) override; |
- scoped_refptr<embedder::PlatformSharedBuffer> shared_buffer_ |
- MOJO_GUARDED_BY(mutex()); |
+ scoped_refptr<PlatformSharedBuffer> shared_buffer_; |
MOJO_DISALLOW_COPY_AND_ASSIGN(SharedBufferDispatcher); |
}; |
-} // namespace system |
+} // namespace edk |
} // namespace mojo |
#endif // MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_ |