#include "mojo/public/cpp/system/data_pipe_producer.h"
#include <algorithm>
#include <limits>
#include <memory>
#include <utility>
#include "base/containers/span.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/location.h"
#include "base/memory/ref_counted_delete_on_sequence.h"
#include "base/numerics/safe_conversions.h"
#include "base/synchronization/lock.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/thread_annotations.h"
#include "mojo/public/cpp/system/simple_watcher.h"
namespace mojo {
namespace {
constexpr size_t kDefaultMaxReadSize = …;
}
class DataPipeProducer::SequenceState
: public base::RefCountedDeleteOnSequence<SequenceState> { … };
DataPipeProducer::DataPipeProducer(ScopedDataPipeProducerHandle producer)
: … { … }
DataPipeProducer::~DataPipeProducer() { … }
void DataPipeProducer::Write(std::unique_ptr<DataSource> data_source,
CompletionCallback callback) { … }
void DataPipeProducer::InitializeNewRequest(CompletionCallback callback) { … }
void DataPipeProducer::OnWriteComplete(CompletionCallback callback,
ScopedDataPipeProducerHandle producer,
MojoResult ready_result) { … }
const DataPipeProducerHandle& DataPipeProducer::GetProducerHandle() const { … }
}