| Index: content/browser/content_resource_dispatcher_host_delegate.h
|
| diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h b/content/browser/content_resource_dispatcher_host_delegate.h
|
| similarity index 57%
|
| copy from chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h
|
| copy to content/browser/content_resource_dispatcher_host_delegate.h
|
| index 3b580561e71451187a3602b0430359bcbef16e11..2c07c61fa84d3bddacf1b15106f423b3f0b45a46 100644
|
| --- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h
|
| +++ b/content/browser/content_resource_dispatcher_host_delegate.h
|
| @@ -1,38 +1,24 @@
|
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Copyright 2016 The Chromium 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 CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
|
| -#define CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
|
| +#ifndef CONTENT_BROWSER_CONTENT_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
|
| +#define CONTENT_BROWSER_CONTENT_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
|
|
|
| -#include <map>
|
| -#include <memory>
|
| -#include <set>
|
| -
|
| -#include "base/compiler_specific.h"
|
| -#include "base/macros.h"
|
| -#include "base/memory/ref_counted.h"
|
| -#include "chrome/browser/external_protocol/external_protocol_handler.h"
|
| #include "content/public/browser/resource_dispatcher_host_delegate.h"
|
|
|
| -class DelayedResourceQueue;
|
| -class DownloadRequestLimiter;
|
| -
|
| -namespace extensions {
|
| -class UserScriptListener;
|
| -}
|
| -
|
| -namespace safe_browsing {
|
| -class SafeBrowsingService;
|
| -}
|
| +namespace content {
|
|
|
| -// Implements ResourceDispatcherHostDelegate. Currently used by the Prerender
|
| -// system to abort requests and add to the load flags when a request begins.
|
| -class ChromeResourceDispatcherHostDelegate
|
| - : public content::ResourceDispatcherHostDelegate {
|
| +// ResourceDispatcherHostDelegate that implements content-specific
|
| +// functionality before delegating again the the content client. Used to
|
| +// separate content/browser/loader from the rest of content.
|
| +class ContentResourceDispatcherHostDelegate
|
| + : public ResourceDispatcherHostDelegate {
|
| public:
|
| - ChromeResourceDispatcherHostDelegate();
|
| - ~ChromeResourceDispatcherHostDelegate() override;
|
| + ContentResourceDispatcherHostDelegate();
|
| + ~ContentResourceDispatcherHostDelegate() override;
|
| +
|
| + void SetChild(ResourceDispatcherHostDelegate* child);
|
|
|
| // ResourceDispatcherHostDelegate implementation.
|
| bool ShouldBeginRequest(const std::string& method,
|
| @@ -87,33 +73,10 @@ class ChromeResourceDispatcherHostDelegate
|
| const net::URLRequest& url_request,
|
| content::ResourceContext* resource_context) override;
|
|
|
| - // Called on the UI thread. Allows switching out the
|
| - // ExternalProtocolHandler::Delegate for testing code.
|
| - static void SetExternalProtocolHandlerDelegateForTesting(
|
| - ExternalProtocolHandler::Delegate* delegate);
|
| -
|
| private:
|
| -#if defined(ENABLE_EXTENSIONS)
|
| - struct StreamTargetInfo {
|
| - std::string extension_id;
|
| - std::string view_id;
|
| - };
|
| -#endif
|
| -
|
| - void AppendStandardResourceThrottles(
|
| - net::URLRequest* request,
|
| - content::ResourceContext* resource_context,
|
| - content::ResourceType resource_type,
|
| - ScopedVector<content::ResourceThrottle>* throttles);
|
| -
|
| - scoped_refptr<DownloadRequestLimiter> download_request_limiter_;
|
| - scoped_refptr<safe_browsing::SafeBrowsingService> safe_browsing_;
|
| -#if defined(ENABLE_EXTENSIONS)
|
| - scoped_refptr<extensions::UserScriptListener> user_script_listener_;
|
| - std::map<net::URLRequest*, StreamTargetInfo> stream_target_info_;
|
| -#endif
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(ChromeResourceDispatcherHostDelegate);
|
| + ResourceDispatcherHostDelegate* child_; // weak
|
| };
|
|
|
| -#endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_BROWSER_CONTENT_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
|
|
|