Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 102 // will be called with | 102 // will be called with |
| 103 // - the |target_id| returned by this function | 103 // - the |target_id| returned by this function |
| 104 // - a StreamHandle instance for the Stream. The handle contains the URL for | 104 // - a StreamHandle instance for the Stream. The handle contains the URL for |
| 105 // reading the Stream etc. | 105 // reading the Stream etc. |
| 106 // The Stream's origin will be set to |origin|. | 106 // The Stream's origin will be set to |origin|. |
| 107 virtual bool ShouldInterceptResourceAsStream( | 107 virtual bool ShouldInterceptResourceAsStream( |
| 108 content::ResourceContext* resource_context, | 108 content::ResourceContext* resource_context, |
| 109 const GURL& url, | 109 const GURL& url, |
| 110 const std::string& mime_type, | 110 const std::string& mime_type, |
| 111 GURL* origin, | 111 GURL* origin, |
| 112 std::string* target_id); | 112 std::string* target_id, |
| 113 std::string* payload, | |
| 114 std::string* view_id); | |
|
jam
2014/05/30 21:05:27
can you document what payload and view_id are and
Zachary Kuznia
2014/05/30 21:21:06
Done.
| |
| 113 | 115 |
| 114 // Informs the delegate that a Stream was created. |target_id| will be filled | 116 // Informs the delegate that a Stream was created. |target_id| will be filled |
| 115 // with the parameter returned by ShouldInterceptResourceAsStream(). The | 117 // with the parameter returned by ShouldInterceptResourceAsStream(). The |
| 116 // Stream can be read from the blob URL of the Stream, but can only be read | 118 // Stream can be read from the blob URL of the Stream, but can only be read |
| 117 // once. | 119 // once. |
| 118 virtual void OnStreamCreated( | 120 virtual void OnStreamCreated( |
| 119 content::ResourceContext* resource_context, | 121 content::ResourceContext* resource_context, |
| 120 int render_process_id, | 122 int render_process_id, |
| 121 int render_view_id, | 123 int render_view_id, |
| 122 const std::string& target_id, | 124 const std::string& target_id, |
| 125 const std::string& view_id, | |
| 123 scoped_ptr<StreamHandle> stream, | 126 scoped_ptr<StreamHandle> stream, |
| 124 int64 expected_content_size); | 127 int64 expected_content_size); |
| 125 | 128 |
| 126 // Informs the delegate that a response has started. | 129 // Informs the delegate that a response has started. |
| 127 virtual void OnResponseStarted( | 130 virtual void OnResponseStarted( |
| 128 net::URLRequest* request, | 131 net::URLRequest* request, |
| 129 ResourceContext* resource_context, | 132 ResourceContext* resource_context, |
| 130 ResourceResponse* response, | 133 ResourceResponse* response, |
| 131 IPC::Sender* sender); | 134 IPC::Sender* sender); |
| 132 | 135 |
| 133 // Informs the delegate that a request has been redirected. | 136 // Informs the delegate that a request has been redirected. |
| 134 virtual void OnRequestRedirected( | 137 virtual void OnRequestRedirected( |
| 135 const GURL& redirect_url, | 138 const GURL& redirect_url, |
| 136 net::URLRequest* request, | 139 net::URLRequest* request, |
| 137 ResourceContext* resource_context, | 140 ResourceContext* resource_context, |
| 138 ResourceResponse* response); | 141 ResourceResponse* response); |
| 139 | 142 |
| 140 // Notification that a request has completed. | 143 // Notification that a request has completed. |
| 141 virtual void RequestComplete(net::URLRequest* url_request); | 144 virtual void RequestComplete(net::URLRequest* url_request); |
| 142 | 145 |
| 143 protected: | 146 protected: |
| 144 ResourceDispatcherHostDelegate(); | 147 ResourceDispatcherHostDelegate(); |
| 145 virtual ~ResourceDispatcherHostDelegate(); | 148 virtual ~ResourceDispatcherHostDelegate(); |
| 146 }; | 149 }; |
| 147 | 150 |
| 148 } // namespace content | 151 } // namespace content |
| 149 | 152 |
| 150 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 153 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| OLD | NEW |