| 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 <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "content/public/browser/resource_request_info.h" | 13 #include "content/public/browser/resource_request_info.h" |
| 14 #include "content/public/common/resource_type.h" | 14 #include "content/public/common/resource_type.h" |
| 15 #include "ui/base/page_transition_types.h" | 15 #include "ui/base/page_transition_types.h" |
| 16 | 16 |
| 17 class GURL; | 17 class GURL; |
| 18 template <class T> class ScopedVector; | 18 template <class T> class ScopedVector; |
| 19 | 19 |
| 20 namespace IPC { | 20 namespace IPC { |
| 21 class Sender; | 21 class Sender; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 virtual bool ShouldInterceptResourceAsStream( | 101 virtual bool ShouldInterceptResourceAsStream( |
| 102 net::URLRequest* request, | 102 net::URLRequest* request, |
| 103 const base::FilePath& plugin_path, | 103 const base::FilePath& plugin_path, |
| 104 const std::string& mime_type, | 104 const std::string& mime_type, |
| 105 GURL* origin, | 105 GURL* origin, |
| 106 std::string* payload); | 106 std::string* payload); |
| 107 | 107 |
| 108 // Informs the delegate that a Stream was created. The Stream can be read from | 108 // Informs the delegate that a Stream was created. The Stream can be read from |
| 109 // the blob URL of the Stream, but can only be read once. | 109 // the blob URL of the Stream, but can only be read once. |
| 110 virtual void OnStreamCreated(net::URLRequest* request, | 110 virtual void OnStreamCreated(net::URLRequest* request, |
| 111 scoped_ptr<content::StreamInfo> stream); | 111 std::unique_ptr<content::StreamInfo> stream); |
| 112 | 112 |
| 113 // Informs the delegate that a response has started. | 113 // Informs the delegate that a response has started. |
| 114 virtual void OnResponseStarted(net::URLRequest* request, | 114 virtual void OnResponseStarted(net::URLRequest* request, |
| 115 ResourceContext* resource_context, | 115 ResourceContext* resource_context, |
| 116 ResourceResponse* response, | 116 ResourceResponse* response, |
| 117 IPC::Sender* sender); | 117 IPC::Sender* sender); |
| 118 | 118 |
| 119 // Informs the delegate that a request has been redirected. | 119 // Informs the delegate that a request has been redirected. |
| 120 virtual void OnRequestRedirected(const GURL& redirect_url, | 120 virtual void OnRequestRedirected(const GURL& redirect_url, |
| 121 net::URLRequest* request, | 121 net::URLRequest* request, |
| 122 ResourceContext* resource_context, | 122 ResourceContext* resource_context, |
| 123 ResourceResponse* response); | 123 ResourceResponse* response); |
| 124 | 124 |
| 125 // Notification that a request has completed. | 125 // Notification that a request has completed. |
| 126 virtual void RequestComplete(net::URLRequest* url_request); | 126 virtual void RequestComplete(net::URLRequest* url_request); |
| 127 | 127 |
| 128 // Asks the embedder if Lo-Fi mode should be enabled for the given request. It | 128 // Asks the embedder if Lo-Fi mode should be enabled for the given request. It |
| 129 // is only called for requests with an unspecified Lo-Fi value. | 129 // is only called for requests with an unspecified Lo-Fi value. |
| 130 virtual bool ShouldEnableLoFiMode(const net::URLRequest& url_request, | 130 virtual bool ShouldEnableLoFiMode(const net::URLRequest& url_request, |
| 131 content::ResourceContext* resource_context); | 131 content::ResourceContext* resource_context); |
| 132 | 132 |
| 133 protected: | 133 protected: |
| 134 ResourceDispatcherHostDelegate(); | 134 ResourceDispatcherHostDelegate(); |
| 135 virtual ~ResourceDispatcherHostDelegate(); | 135 virtual ~ResourceDispatcherHostDelegate(); |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 } // namespace content | 138 } // namespace content |
| 139 | 139 |
| 140 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 140 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| OLD | NEW |