2012-04-03 03:34:16 +02:00
|
|
|
// Copyright (c) 2012 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_URL_REQUEST_INTERCEPTOR_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_URL_REQUEST_INTERCEPTOR_H_
|
|
|
|
#pragma once
|
|
|
|
|
2014-12-13 21:18:31 +01:00
|
|
|
#include "net/url_request/url_request_interceptor.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Used for intercepting resource requests, redirects and responses. The single
|
|
|
|
// instance of this class is managed by CefURLRequestContextGetter.
|
2014-12-13 21:18:31 +01:00
|
|
|
class CefRequestInterceptor : public net::URLRequestInterceptor {
|
2012-04-03 03:34:16 +02:00
|
|
|
public:
|
|
|
|
CefRequestInterceptor();
|
2014-11-12 20:25:15 +01:00
|
|
|
~CefRequestInterceptor() override;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2014-12-13 21:18:31 +01:00
|
|
|
// net::URLRequestInterceptor methods.
|
|
|
|
net::URLRequestJob* MaybeInterceptRequest(
|
2012-08-29 00:26:35 +02:00
|
|
|
net::URLRequest* request,
|
2014-12-13 21:18:31 +01:00
|
|
|
net::NetworkDelegate* network_delegate) const override;
|
2014-11-12 20:25:15 +01:00
|
|
|
net::URLRequestJob* MaybeInterceptRedirect(
|
2012-08-29 00:26:35 +02:00
|
|
|
net::URLRequest* request,
|
|
|
|
net::NetworkDelegate* network_delegate,
|
2014-12-13 21:18:31 +01:00
|
|
|
const GURL& location) const override;
|
2014-11-12 20:25:15 +01:00
|
|
|
net::URLRequestJob* MaybeInterceptResponse(
|
2012-08-29 00:26:35 +02:00
|
|
|
net::URLRequest* request,
|
2014-12-13 21:18:31 +01:00
|
|
|
net::NetworkDelegate* network_delegate) const override;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(CefRequestInterceptor);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_URL_REQUEST_INTERCEPTOR_H_
|