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

Side by Side Diff: mojo/edk/system/remote_producer_data_pipe_impl.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_REMOTE_PRODUCER_DATA_PIPE_IMPL_H_ 5 #ifndef MOJO_EDK_SYSTEM_REMOTE_PRODUCER_DATA_PIPE_IMPL_H_
6 #define MOJO_EDK_SYSTEM_REMOTE_PRODUCER_DATA_PIPE_IMPL_H_ 6 #define MOJO_EDK_SYSTEM_REMOTE_PRODUCER_DATA_PIPE_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/memory/aligned_memory.h" 10 #include "base/memory/aligned_memory.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 UserPointer<uint32_t> buffer_num_bytes) override; 56 UserPointer<uint32_t> buffer_num_bytes) override;
57 MojoResult ProducerEndWriteData(uint32_t num_bytes_written) override; 57 MojoResult ProducerEndWriteData(uint32_t num_bytes_written) override;
58 HandleSignalsState ProducerGetHandleSignalsState() const override; 58 HandleSignalsState ProducerGetHandleSignalsState() const override;
59 void ProducerStartSerialize(Channel* channel, 59 void ProducerStartSerialize(Channel* channel,
60 size_t* max_size, 60 size_t* max_size,
61 size_t* max_platform_handles) override; 61 size_t* max_platform_handles) override;
62 bool ProducerEndSerialize( 62 bool ProducerEndSerialize(
63 Channel* channel, 63 Channel* channel,
64 void* destination, 64 void* destination,
65 size_t* actual_size, 65 size_t* actual_size,
66 std::vector<embedder::ScopedPlatformHandle>* platform_handles) override; 66 std::vector<platform::ScopedPlatformHandle>* platform_handles) override;
67 void ConsumerClose() override; 67 void ConsumerClose() override;
68 MojoResult ConsumerReadData(UserPointer<void> elements, 68 MojoResult ConsumerReadData(UserPointer<void> elements,
69 UserPointer<uint32_t> num_bytes, 69 UserPointer<uint32_t> num_bytes,
70 uint32_t max_num_bytes_to_read, 70 uint32_t max_num_bytes_to_read,
71 uint32_t min_num_bytes_to_read, 71 uint32_t min_num_bytes_to_read,
72 bool peek) override; 72 bool peek) override;
73 MojoResult ConsumerDiscardData(UserPointer<uint32_t> num_bytes, 73 MojoResult ConsumerDiscardData(UserPointer<uint32_t> num_bytes,
74 uint32_t max_num_bytes_to_discard, 74 uint32_t max_num_bytes_to_discard,
75 uint32_t min_num_bytes_to_discard) override; 75 uint32_t min_num_bytes_to_discard) override;
76 MojoResult ConsumerQueryData(UserPointer<uint32_t> num_bytes) override; 76 MojoResult ConsumerQueryData(UserPointer<uint32_t> num_bytes) override;
77 MojoResult ConsumerBeginReadData( 77 MojoResult ConsumerBeginReadData(
78 UserPointer<const void*> buffer, 78 UserPointer<const void*> buffer,
79 UserPointer<uint32_t> buffer_num_bytes) override; 79 UserPointer<uint32_t> buffer_num_bytes) override;
80 MojoResult ConsumerEndReadData(uint32_t num_bytes_read) override; 80 MojoResult ConsumerEndReadData(uint32_t num_bytes_read) override;
81 HandleSignalsState ConsumerGetHandleSignalsState() const override; 81 HandleSignalsState ConsumerGetHandleSignalsState() const override;
82 void ConsumerStartSerialize(Channel* channel, 82 void ConsumerStartSerialize(Channel* channel,
83 size_t* max_size, 83 size_t* max_size,
84 size_t* max_platform_handles) override; 84 size_t* max_platform_handles) override;
85 bool ConsumerEndSerialize( 85 bool ConsumerEndSerialize(
86 Channel* channel, 86 Channel* channel,
87 void* destination, 87 void* destination,
88 size_t* actual_size, 88 size_t* actual_size,
89 std::vector<embedder::ScopedPlatformHandle>* platform_handles) override; 89 std::vector<platform::ScopedPlatformHandle>* platform_handles) override;
90 bool OnReadMessage(unsigned port, MessageInTransit* message) override; 90 bool OnReadMessage(unsigned port, MessageInTransit* message) override;
91 void OnDetachFromChannel(unsigned port) override; 91 void OnDetachFromChannel(unsigned port) override;
92 92
93 void EnsureBuffer(); 93 void EnsureBuffer();
94 void DestroyBuffer(); 94 void DestroyBuffer();
95 95
96 // Get the maximum (single) write/read size right now (in number of elements); 96 // Get the maximum (single) write/read size right now (in number of elements);
97 // result fits in a |uint32_t|. 97 // result fits in a |uint32_t|.
98 size_t GetMaxNumBytesToWrite(); 98 size_t GetMaxNumBytesToWrite();
99 size_t GetMaxNumBytesToRead(); 99 size_t GetMaxNumBytesToRead();
(...skipping 13 matching lines...) Expand all
113 size_t start_index_; 113 size_t start_index_;
114 size_t current_num_bytes_; 114 size_t current_num_bytes_;
115 115
116 MOJO_DISALLOW_COPY_AND_ASSIGN(RemoteProducerDataPipeImpl); 116 MOJO_DISALLOW_COPY_AND_ASSIGN(RemoteProducerDataPipeImpl);
117 }; 117 };
118 118
119 } // namespace system 119 } // namespace system
120 } // namespace mojo 120 } // namespace mojo
121 121
122 #endif // MOJO_EDK_SYSTEM_REMOTE_PRODUCER_DATA_PIPE_IMPL_H_ 122 #endif // MOJO_EDK_SYSTEM_REMOTE_PRODUCER_DATA_PIPE_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/remote_message_pipe_unittest.cc ('k') | mojo/edk/system/remote_producer_data_pipe_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698