2019-04-24 04:50:25 +02:00
|
|
|
// Copyright (c) 2019 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_BROWSER_NET_SERVICE_RESOURCE_REQUEST_HANDLER_WRAPPER_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_NET_SERVICE_RESOURCE_REQUEST_HANDLER_WRAPPER_H_
|
|
|
|
|
2023-01-30 18:43:54 +01:00
|
|
|
#include "base/functional/callback_forward.h"
|
2019-10-01 15:55:16 +02:00
|
|
|
#include "content/public/browser/web_contents.h"
|
2019-04-24 04:50:25 +02:00
|
|
|
|
|
|
|
namespace content {
|
|
|
|
class BrowserContext;
|
|
|
|
class RenderFrameHost;
|
|
|
|
} // namespace content
|
|
|
|
|
|
|
|
namespace network {
|
|
|
|
struct ResourceRequest;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace url {
|
|
|
|
class Origin;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace net_service {
|
|
|
|
|
|
|
|
class InterceptedRequestHandler;
|
|
|
|
|
|
|
|
// Create an InterceptedRequestHandler that will delegate to a
|
|
|
|
// CefResourceRequestHandler. The resulting object should be passed to
|
|
|
|
// ProxyURLLoaderFactory::CreateProxy. Called on the UI thread only.
|
|
|
|
std::unique_ptr<InterceptedRequestHandler> CreateInterceptedRequestHandler(
|
|
|
|
content::BrowserContext* browser_context,
|
|
|
|
content::RenderFrameHost* frame,
|
|
|
|
int render_process_id,
|
|
|
|
bool is_navigation,
|
|
|
|
bool is_download,
|
|
|
|
const url::Origin& request_initiator);
|
|
|
|
|
|
|
|
// Create an InterceptedRequestHandler that will delegate to a
|
|
|
|
// CefResourceRequestHandler. The resulting object should be passed to
|
2021-08-19 23:07:44 +02:00
|
|
|
// ProxyURLLoaderFactory::CreateProxy. Called on the UI thread only.
|
2019-04-24 04:50:25 +02:00
|
|
|
std::unique_ptr<InterceptedRequestHandler> CreateInterceptedRequestHandler(
|
2019-10-01 15:55:16 +02:00
|
|
|
content::WebContents::Getter web_contents_getter,
|
2019-04-24 04:50:25 +02:00
|
|
|
int frame_tree_node_id,
|
2020-09-25 03:40:47 +02:00
|
|
|
const network::ResourceRequest& request,
|
2021-06-04 03:34:56 +02:00
|
|
|
const base::RepeatingClosure& unhandled_request_callback);
|
2019-04-24 04:50:25 +02:00
|
|
|
|
|
|
|
} // namespace net_service
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_NET_SERVICE_RESOURCE_REQUEST_HANDLER_WRAPPER_H_
|