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_info.h"
11 bool ResourceDispatcherHostDelegate::ShouldBeginRequest(
12 const std::string
& method
,
14 ResourceType resource_type
,
15 ResourceContext
* resource_context
) {
19 void ResourceDispatcherHostDelegate::RequestBeginning(
20 net::URLRequest
* request
,
21 ResourceContext
* resource_context
,
22 AppCacheService
* appcache_service
,
23 ResourceType resource_type
,
24 ScopedVector
<ResourceThrottle
>* throttles
) {
27 void ResourceDispatcherHostDelegate::DownloadStarting(
28 net::URLRequest
* request
,
29 ResourceContext
* resource_context
,
33 bool is_content_initiated
,
35 ScopedVector
<ResourceThrottle
>* throttles
) {
38 ResourceDispatcherHostLoginDelegate
*
39 ResourceDispatcherHostDelegate::CreateLoginDelegate(
40 net::AuthChallengeInfo
* auth_info
,
41 net::URLRequest
* request
) {
45 bool ResourceDispatcherHostDelegate::HandleExternalProtocol(
50 ui::PageTransition page_transition
,
51 bool has_user_gesture
) {
55 bool ResourceDispatcherHostDelegate::ShouldForceDownloadResource(
57 const std::string
& mime_type
) {
61 bool ResourceDispatcherHostDelegate::ShouldInterceptResourceAsStream(
62 net::URLRequest
* request
,
63 const base::FilePath
& plugin_path
,
64 const std::string
& mime_type
,
66 std::string
* payload
) {
70 void ResourceDispatcherHostDelegate::OnStreamCreated(
71 net::URLRequest
* request
,
72 scoped_ptr
<content::StreamInfo
> stream
) {
75 void ResourceDispatcherHostDelegate::OnResponseStarted(
76 net::URLRequest
* request
,
77 ResourceContext
* resource_context
,
78 ResourceResponse
* response
,
79 IPC::Sender
* sender
) {
82 void ResourceDispatcherHostDelegate::OnRequestRedirected(
83 const GURL
& redirect_url
,
84 net::URLRequest
* request
,
85 ResourceContext
* resource_context
,
86 ResourceResponse
* response
) {
89 void ResourceDispatcherHostDelegate::RequestComplete(
90 net::URLRequest
* url_request
) {
93 ResourceDispatcherHostDelegate::ResourceDispatcherHostDelegate() {
96 ResourceDispatcherHostDelegate::~ResourceDispatcherHostDelegate() {
99 } // namespace content