Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: content/public/browser/resource_dispatcher_host_delegate.cc

Issue 12645004: Add Resource Handler for creating Streams to forward to extensions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Disable Stream Resource Throttle Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/public/browser/resource_dispatcher_host_delegate.h" 5 #include "content/public/browser/resource_dispatcher_host_delegate.h"
6 6
7 #include "content/public/browser/stream_handle.h"
8
7 namespace content { 9 namespace content {
8 10
9 bool ResourceDispatcherHostDelegate::ShouldBeginRequest( 11 bool ResourceDispatcherHostDelegate::ShouldBeginRequest(
10 int child_id, 12 int child_id,
11 int route_id, 13 int route_id,
12 const std::string& method, 14 const std::string& method,
13 const GURL& url, 15 const GURL& url,
14 ResourceType::Type resource_type, 16 ResourceType::Type resource_type,
15 ResourceContext* resource_context, 17 ResourceContext* resource_context,
16 const Referrer& referrer) { 18 const Referrer& referrer) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 int route_id) { 65 int route_id) {
64 return true; 66 return true;
65 } 67 }
66 68
67 bool ResourceDispatcherHostDelegate::ShouldForceDownloadResource( 69 bool ResourceDispatcherHostDelegate::ShouldForceDownloadResource(
68 const GURL& url, 70 const GURL& url,
69 const std::string& mime_type) { 71 const std::string& mime_type) {
70 return false; 72 return false;
71 } 73 }
72 74
75 bool ResourceDispatcherHostDelegate::ShouldInterceptResourceAsStream(
76 content::ResourceContext* resource_context,
77 const GURL& url,
78 const std::string& mime_type,
79 GURL* security_origin,
80 std::string* target_id) {
81 return false;
82 }
83
84 void ResourceDispatcherHostDelegate::OnStreamCreated(
85 content::ResourceContext* resource_context,
86 int render_process_id,
87 int render_view_id,
88 const std::string& target_id,
89 scoped_ptr<StreamHandle> stream) {
90 }
91
73 void ResourceDispatcherHostDelegate::OnResponseStarted( 92 void ResourceDispatcherHostDelegate::OnResponseStarted(
74 net::URLRequest* request, 93 net::URLRequest* request,
75 ResourceContext* resource_context, 94 ResourceContext* resource_context,
76 ResourceResponse* response, 95 ResourceResponse* response,
77 IPC::Sender* sender) { 96 IPC::Sender* sender) {
78 } 97 }
79 98
80 void ResourceDispatcherHostDelegate::OnRequestRedirected( 99 void ResourceDispatcherHostDelegate::OnRequestRedirected(
81 const GURL& redirect_url, 100 const GURL& redirect_url,
82 net::URLRequest* request, 101 net::URLRequest* request,
83 ResourceContext* resource_context, 102 ResourceContext* resource_context,
84 ResourceResponse* response) { 103 ResourceResponse* response) {
85 } 104 }
86 105
87 ResourceDispatcherHostDelegate::ResourceDispatcherHostDelegate() { 106 ResourceDispatcherHostDelegate::ResourceDispatcherHostDelegate() {
88 } 107 }
89 108
90 ResourceDispatcherHostDelegate::~ResourceDispatcherHostDelegate() { 109 ResourceDispatcherHostDelegate::~ResourceDispatcherHostDelegate() {
91 } 110 }
92 111
93 } // namespace content 112 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/resource_dispatcher_host_delegate.h ('k') | content/public/browser/stream_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698