1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/public/browser/resource_dispatcher_host_delegate.h"
7 #include "content/public/browser/stream_handle.h"
11 bool ResourceDispatcherHostDelegate::ShouldBeginRequest(
14 const std::string& method,
16 ResourceType::Type resource_type,
17 ResourceContext* resource_context) {
21 void ResourceDispatcherHostDelegate::RequestBeginning(
22 net::URLRequest* request,
23 ResourceContext* resource_context,
24 appcache::AppCacheService* appcache_service,
25 ResourceType::Type resource_type,
28 ScopedVector<ResourceThrottle>* throttles) {
31 void ResourceDispatcherHostDelegate::DownloadStarting(
32 net::URLRequest* request,
33 ResourceContext* resource_context,
37 bool is_content_initiated,
39 ScopedVector<ResourceThrottle>* throttles) {
42 ResourceDispatcherHostLoginDelegate*
43 ResourceDispatcherHostDelegate::CreateLoginDelegate(
44 net::AuthChallengeInfo* auth_info,
45 net::URLRequest* request) {
49 bool ResourceDispatcherHostDelegate::HandleExternalProtocol(
53 bool initiated_by_user_gesture) {
57 bool ResourceDispatcherHostDelegate::ShouldForceDownloadResource(
59 const std::string& mime_type) {
63 bool ResourceDispatcherHostDelegate::ShouldInterceptResourceAsStream(
64 content::ResourceContext* resource_context,
66 const std::string& mime_type,
68 std::string* target_id) {
72 void ResourceDispatcherHostDelegate::OnStreamCreated(
73 content::ResourceContext* resource_context,
74 int render_process_id,
76 const std::string& target_id,
77 scoped_ptr<StreamHandle> stream,
78 int64 expected_content_size) {
81 void ResourceDispatcherHostDelegate::OnResponseStarted(
82 net::URLRequest* request,
83 ResourceContext* resource_context,
84 ResourceResponse* response,
85 IPC::Sender* sender) {
88 void ResourceDispatcherHostDelegate::OnRequestRedirected(
89 const GURL& redirect_url,
90 net::URLRequest* request,
91 ResourceContext* resource_context,
92 ResourceResponse* response) {
95 void ResourceDispatcherHostDelegate::RequestComplete(
96 net::URLRequest* url_request) {
99 ResourceDispatcherHostDelegate::ResourceDispatcherHostDelegate() {
102 ResourceDispatcherHostDelegate::~ResourceDispatcherHostDelegate() {
105 } // namespace content