chromium/components/pdf/browser/pdf_url_loader_request_interceptor.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/pdf/browser/pdf_url_loader_request_interceptor.h"

#include <memory>
#include <optional>
#include <utility>

#include "base/functional/bind.h"
#include "components/pdf/browser/pdf_stream_delegate.h"
#include "components/pdf/browser/plugin_response_writer.h"
#include "content/public/browser/url_loader_request_interceptor.h"
#include "content/public/browser/web_contents.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/mojom/fetch_api.mojom-shared.h"
#include "services/network/public/mojom/url_loader.mojom-forward.h"
#include "url/gurl.h"

namespace pdf {

namespace {

void FinishLoader(std::unique_ptr<PluginResponseWriter> /*response_writer*/) {}

void CreateLoaderAndStart(
    const PdfStreamDelegate::StreamInfo& stream_info,
    const network::ResourceRequest& request,
    mojo::PendingReceiver<network::mojom::URLLoader> receiver,
    mojo::PendingRemote<network::mojom::URLLoaderClient> client) {}

}  // namespace

// static
std::unique_ptr<content::URLLoaderRequestInterceptor>
PdfURLLoaderRequestInterceptor::MaybeCreateInterceptor(
    int frame_tree_node_id,
    std::unique_ptr<PdfStreamDelegate> stream_delegate) {}

PdfURLLoaderRequestInterceptor::PdfURLLoaderRequestInterceptor(
    int frame_tree_node_id,
    std::unique_ptr<PdfStreamDelegate> stream_delegate)
    :{}

PdfURLLoaderRequestInterceptor::~PdfURLLoaderRequestInterceptor() = default;

void PdfURLLoaderRequestInterceptor::MaybeCreateLoader(
    const network::ResourceRequest& tentative_resource_request,
    content::BrowserContext* browser_context,
    content::URLLoaderRequestInterceptor::LoaderCallback callback) {}

content::URLLoaderRequestInterceptor::RequestHandler
PdfURLLoaderRequestInterceptor::CreateRequestHandler(
    const network::ResourceRequest& tentative_resource_request) {}

}  // namespace pdf