summaryrefslogtreecommitdiffstats
path: root/src/core/net/plugin_response_interceptor_url_loader_throttle.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/net/plugin_response_interceptor_url_loader_throttle.h')
-rw-r--r--src/core/net/plugin_response_interceptor_url_loader_throttle.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/net/plugin_response_interceptor_url_loader_throttle.h b/src/core/net/plugin_response_interceptor_url_loader_throttle.h
index 7b9db6490..205ab25e6 100644
--- a/src/core/net/plugin_response_interceptor_url_loader_throttle.h
+++ b/src/core/net/plugin_response_interceptor_url_loader_throttle.h
@@ -41,11 +41,11 @@
#define PLUGIN_RESPONSE_INTERCEPTOR_URL_LOADER_THROTTLE_H_
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "third_party/blink/public/common/loader/url_loader_throttle.h"
namespace content {
class BrowserContext;
-class ResourceContext;
}
namespace QtWebEngineCore {
@@ -53,8 +53,6 @@ namespace QtWebEngineCore {
class PluginResponseInterceptorURLLoaderThrottle : public blink::URLLoaderThrottle
{
public:
- PluginResponseInterceptorURLLoaderThrottle(content::ResourceContext *resource_context,
- int resource_type, int frame_tree_node_id);
PluginResponseInterceptorURLLoaderThrottle(content::BrowserContext *browser_context,
int resource_type, int frame_tree_node_id);
~PluginResponseInterceptorURLLoaderThrottle() override = default;
@@ -63,11 +61,17 @@ private:
// content::URLLoaderThrottle overrides;
void WillProcessResponse(const GURL &response_url, network::mojom::URLResponseHead *response_head, bool *defer) override;
- content::ResourceContext *m_resource_context = nullptr;
+ // Resumes loading for an intercepted response. This would give the extension
+ // layer chance to initialize its browser side state.
+ void ResumeLoad();
+
content::BrowserContext *m_browser_context = nullptr;
const int m_resource_type;
const int m_frame_tree_node_id;
+ base::WeakPtrFactory<PluginResponseInterceptorURLLoaderThrottle>
+ weak_factory_{this};
+
DISALLOW_COPY_AND_ASSIGN(PluginResponseInterceptorURLLoaderThrottle);
};