#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "content/renderer/mhtml_handle_writer.h"
#include "base/containers/span.h"
#include "base/metrics/histogram_macros.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/trace_event/trace_event.h"
#include "content/common/download/mhtml_file_writer.mojom.h"
#include "content/public/renderer/render_thread.h"
#include "third_party/blink/public/platform/web_thread_safe_data.h"
namespace content {
MHTMLHandleWriter::MHTMLHandleWriter(
scoped_refptr<base::TaskRunner> main_thread_task_runner,
MHTMLWriteCompleteCallback callback)
: … { … }
MHTMLHandleWriter::~MHTMLHandleWriter() { … }
void MHTMLHandleWriter::WriteContents(
std::vector<blink::WebThreadSafeData> mhtml_contents) { … }
void MHTMLHandleWriter::Finish(mojom::MhtmlSaveStatus save_status) { … }
MHTMLFileHandleWriter::MHTMLFileHandleWriter(
scoped_refptr<base::TaskRunner> main_thread_task_runner,
MHTMLWriteCompleteCallback callback,
base::File file)
: … { … }
MHTMLFileHandleWriter::~MHTMLFileHandleWriter() { … }
void MHTMLFileHandleWriter::WriteContentsImpl(
std::vector<blink::WebThreadSafeData> mhtml_contents) { … }
void MHTMLFileHandleWriter::Close() { … }
MHTMLProducerHandleWriter::MHTMLProducerHandleWriter(
scoped_refptr<base::TaskRunner> main_thread_task_runner,
MHTMLWriteCompleteCallback callback,
mojo::ScopedDataPipeProducerHandle producer)
: … { … }
void MHTMLProducerHandleWriter::WriteContentsImpl(
std::vector<blink::WebThreadSafeData> mhtml_contents) { … }
MHTMLProducerHandleWriter::~MHTMLProducerHandleWriter() { … }
void MHTMLProducerHandleWriter::Close() { … }
void MHTMLProducerHandleWriter::BeginWatchingHandle() { … }
void MHTMLProducerHandleWriter::TryWritingContents(
MojoResult result,
const mojo::HandleSignalsState& state) { … }
}