| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // If the stream will be rendered in a BrowserPlugin, |payload| will contain | 97 // If the stream will be rendered in a BrowserPlugin, |payload| will contain |
| 98 // the data that should be given to the old ResourceHandler to forward to the | 98 // the data that should be given to the old ResourceHandler to forward to the |
| 99 // renderer process. | 99 // renderer process. |
| 100 virtual bool ShouldInterceptResourceAsStream( | 100 virtual bool ShouldInterceptResourceAsStream( |
| 101 net::URLRequest* request, | 101 net::URLRequest* request, |
| 102 const base::FilePath& plugin_path, | 102 const base::FilePath& plugin_path, |
| 103 const std::string& mime_type, | 103 const std::string& mime_type, |
| 104 GURL* origin, | 104 GURL* origin, |
| 105 std::string* payload); | 105 std::string* payload); |
| 106 | 106 |
| 107 // Returns if the response should never sent to the renderer. Note that the |
| 108 // request is still allowed to complete. |
| 109 virtual bool ShouldSinkResponse(net::URLRequest* request, |
| 110 ResourceType resource_type); |
| 111 |
| 107 // Informs the delegate that a Stream was created. The Stream can be read from | 112 // Informs the delegate that a Stream was created. The Stream can be read from |
| 108 // the blob URL of the Stream, but can only be read once. | 113 // the blob URL of the Stream, but can only be read once. |
| 109 virtual void OnStreamCreated(net::URLRequest* request, | 114 virtual void OnStreamCreated(net::URLRequest* request, |
| 110 std::unique_ptr<content::StreamInfo> stream); | 115 std::unique_ptr<content::StreamInfo> stream); |
| 111 | 116 |
| 112 // Informs the delegate that a response has started. | 117 // Informs the delegate that a response has started. |
| 113 virtual void OnResponseStarted(net::URLRequest* request, | 118 virtual void OnResponseStarted(net::URLRequest* request, |
| 114 ResourceContext* resource_context, | 119 ResourceContext* resource_context, |
| 115 ResourceResponse* response); | 120 ResourceResponse* response); |
| 116 | 121 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 142 virtual void OnAbortedFrameLoad(const GURL& url, | 147 virtual void OnAbortedFrameLoad(const GURL& url, |
| 143 base::TimeDelta request_loading_time); | 148 base::TimeDelta request_loading_time); |
| 144 | 149 |
| 145 protected: | 150 protected: |
| 146 virtual ~ResourceDispatcherHostDelegate(); | 151 virtual ~ResourceDispatcherHostDelegate(); |
| 147 }; | 152 }; |
| 148 | 153 |
| 149 } // namespace content | 154 } // namespace content |
| 150 | 155 |
| 151 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 156 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| OLD | NEW |