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

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

Issue 1483823004: EDK: Move {platform_handle,scoped_platform_handle}.* to //mojo/edk/platform. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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 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 <utility> 8 #include <utility>
9 9
10 #include "mojo/edk/embedder/platform_shared_buffer.h" 10 #include "mojo/edk/embedder/platform_shared_buffer.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // |Dispatcher| public methods: 53 // |Dispatcher| public methods:
54 Type GetType() const override; 54 Type GetType() const override;
55 55
56 // The "opposite" of |SerializeAndClose()|. (Typically this is called by 56 // The "opposite" of |SerializeAndClose()|. (Typically this is called by
57 // |Dispatcher::Deserialize()|.) 57 // |Dispatcher::Deserialize()|.)
58 static util::RefPtr<SharedBufferDispatcher> Deserialize( 58 static util::RefPtr<SharedBufferDispatcher> Deserialize(
59 Channel* channel, 59 Channel* channel,
60 const void* source, 60 const void* source,
61 size_t size, 61 size_t size,
62 std::vector<embedder::ScopedPlatformHandle>* platform_handles); 62 std::vector<platform::ScopedPlatformHandle>* platform_handles);
63 63
64 private: 64 private:
65 static util::RefPtr<SharedBufferDispatcher> CreateInternal( 65 static util::RefPtr<SharedBufferDispatcher> CreateInternal(
66 util::RefPtr<embedder::PlatformSharedBuffer>&& shared_buffer) { 66 util::RefPtr<embedder::PlatformSharedBuffer>&& shared_buffer) {
67 return AdoptRef(new SharedBufferDispatcher(std::move(shared_buffer))); 67 return AdoptRef(new SharedBufferDispatcher(std::move(shared_buffer)));
68 } 68 }
69 69
70 explicit SharedBufferDispatcher( 70 explicit SharedBufferDispatcher(
71 util::RefPtr<embedder::PlatformSharedBuffer>&& shared_buffer); 71 util::RefPtr<embedder::PlatformSharedBuffer>&& shared_buffer);
72 ~SharedBufferDispatcher() override; 72 ~SharedBufferDispatcher() override;
(...skipping 20 matching lines...) Expand all
93 MojoMapBufferFlags flags, 93 MojoMapBufferFlags flags,
94 std::unique_ptr<embedder::PlatformSharedBufferMapping>* mapping) override; 94 std::unique_ptr<embedder::PlatformSharedBufferMapping>* mapping) override;
95 void StartSerializeImplNoLock(Channel* channel, 95 void StartSerializeImplNoLock(Channel* channel,
96 size_t* max_size, 96 size_t* max_size,
97 size_t* max_platform_handles) override 97 size_t* max_platform_handles) override
98 MOJO_NOT_THREAD_SAFE; 98 MOJO_NOT_THREAD_SAFE;
99 bool EndSerializeAndCloseImplNoLock( 99 bool EndSerializeAndCloseImplNoLock(
100 Channel* channel, 100 Channel* channel,
101 void* destination, 101 void* destination,
102 size_t* actual_size, 102 size_t* actual_size,
103 std::vector<embedder::ScopedPlatformHandle>* platform_handles) override 103 std::vector<platform::ScopedPlatformHandle>* platform_handles) override
104 MOJO_NOT_THREAD_SAFE; 104 MOJO_NOT_THREAD_SAFE;
105 105
106 util::RefPtr<embedder::PlatformSharedBuffer> shared_buffer_ 106 util::RefPtr<embedder::PlatformSharedBuffer> shared_buffer_
107 MOJO_GUARDED_BY(mutex()); 107 MOJO_GUARDED_BY(mutex());
108 108
109 MOJO_DISALLOW_COPY_AND_ASSIGN(SharedBufferDispatcher); 109 MOJO_DISALLOW_COPY_AND_ASSIGN(SharedBufferDispatcher);
110 }; 110 };
111 111
112 } // namespace system 112 } // namespace system
113 } // namespace mojo 113 } // namespace mojo
114 114
115 #endif // MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_ 115 #endif // MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/remote_producer_data_pipe_impl.cc ('k') | mojo/edk/system/shared_buffer_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698