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

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

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: Code review fixes 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 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // guarantee that the app successfully handled it. 100 // guarantee that the app successfully handled it.
101 virtual bool HandleExternalProtocol(const GURL& url, 101 virtual bool HandleExternalProtocol(const GURL& url,
102 int child_id, 102 int child_id,
103 int route_id); 103 int route_id);
104 104
105 // Returns true if we should force the given resource to be downloaded. 105 // Returns true if we should force the given resource to be downloaded.
106 // Otherwise, the content layer decides. 106 // Otherwise, the content layer decides.
107 virtual bool ShouldForceDownloadResource( 107 virtual bool ShouldForceDownloadResource(
108 const GURL& url, const std::string& mime_type); 108 const GURL& url, const std::string& mime_type);
109 109
110 // Returns true and sets |security_origin| and |target_id| if a Stream should
111 // be created for the resource.
darin (slow to review) 2013/03/16 17:23:51 please document the fact that OnStreamCreated will
Zachary Kuznia 2013/03/17 01:30:33 I expanded these comments to explain this behavior
112 virtual bool ShouldInterceptResourceAsStream(
113 content::ResourceContext* resource_context,
114 const GURL& url,
115 const std::string& mime_type,
116 GURL* security_origin,
117 std::string* target_id);
118
119 // Informs the delegate that a stream was created.
120 virtual void OnStreamCreated(
121 content::ResourceContext* resource_context,
122 int render_process_id,
123 int render_view_id,
124 const std::string& target_id,
125 const GURL& stream_url,
126 const std::string& mime_type,
127 const GURL& original_url);
128
110 // Informs the delegate that a response has started. 129 // Informs the delegate that a response has started.
111 virtual void OnResponseStarted( 130 virtual void OnResponseStarted(
112 net::URLRequest* request, 131 net::URLRequest* request,
113 ResourceContext* resource_context, 132 ResourceContext* resource_context,
114 ResourceResponse* response, 133 ResourceResponse* response,
115 IPC::Sender* sender); 134 IPC::Sender* sender);
116 135
117 // Informs the delegate that a request has been redirected. 136 // Informs the delegate that a request has been redirected.
118 virtual void OnRequestRedirected( 137 virtual void OnRequestRedirected(
119 const GURL& redirect_url, 138 const GURL& redirect_url,
120 net::URLRequest* request, 139 net::URLRequest* request,
121 ResourceContext* resource_context, 140 ResourceContext* resource_context,
122 ResourceResponse* response); 141 ResourceResponse* response);
123 142
124 protected: 143 protected:
125 ResourceDispatcherHostDelegate(); 144 ResourceDispatcherHostDelegate();
126 virtual ~ResourceDispatcherHostDelegate(); 145 virtual ~ResourceDispatcherHostDelegate();
127 }; 146 };
128 147
129 } // namespace content 148 } // namespace content
130 149
131 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ 150 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/content_browser.gypi ('k') | content/public/browser/resource_dispatcher_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698