| 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 |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "content/public/browser/resource_request_info.h" | 14 #include "content/public/browser/resource_request_info.h" |
| 15 #include "content/public/common/previews_state.h" |
| 15 #include "content/public/common/resource_type.h" | 16 #include "content/public/common/resource_type.h" |
| 16 #include "ui/base/page_transition_types.h" | 17 #include "ui/base/page_transition_types.h" |
| 17 | 18 |
| 18 class GURL; | 19 class GURL; |
| 19 template <class T> class ScopedVector; | 20 template <class T> class ScopedVector; |
| 20 | 21 |
| 21 namespace net { | 22 namespace net { |
| 22 class AuthChallengeInfo; | 23 class AuthChallengeInfo; |
| 23 class ClientCertStore; | 24 class ClientCertStore; |
| 24 class URLRequest; | 25 class URLRequest; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 net::URLRequest* request, | 115 net::URLRequest* request, |
| 115 ResourceContext* resource_context, | 116 ResourceContext* resource_context, |
| 116 ResourceResponse* response); | 117 ResourceResponse* response); |
| 117 | 118 |
| 118 // Notification that a request has completed. | 119 // Notification that a request has completed. |
| 119 virtual void RequestComplete(net::URLRequest* url_request, int net_error); | 120 virtual void RequestComplete(net::URLRequest* url_request, int net_error); |
| 120 // Deprecated. | 121 // Deprecated. |
| 121 // TODO(maksims): Remove this once all the callers are modified. | 122 // TODO(maksims): Remove this once all the callers are modified. |
| 122 virtual void RequestComplete(net::URLRequest* url_request); | 123 virtual void RequestComplete(net::URLRequest* url_request); |
| 123 | 124 |
| 124 // Asks the embedder if Lo-Fi mode should be enabled for the given request. It | 125 // Asks the embedder for the PreviewsState which says which previews should |
| 125 // is only called for requests with an unspecified Lo-Fi value. | 126 // be enabled for the given request. It is only called for requests with an |
| 126 virtual bool ShouldEnableLoFiMode(const net::URLRequest& url_request, | 127 // unspecified Previews state. |
| 127 content::ResourceContext* resource_context); | 128 virtual PreviewsState GetPreviewsState( |
| 129 const net::URLRequest& url_request, |
| 130 content::ResourceContext* resource_context); |
| 128 | 131 |
| 129 // Asks the embedder for NavigationData related to this request. It is only | 132 // Asks the embedder for NavigationData related to this request. It is only |
| 130 // called for navigation requests. | 133 // called for navigation requests. |
| 131 virtual NavigationData* GetNavigationData(net::URLRequest* request) const; | 134 virtual NavigationData* GetNavigationData(net::URLRequest* request) const; |
| 132 | 135 |
| 133 // Get platform ClientCertStore. May return nullptr. | 136 // Get platform ClientCertStore. May return nullptr. |
| 134 virtual std::unique_ptr<net::ClientCertStore> CreateClientCertStore( | 137 virtual std::unique_ptr<net::ClientCertStore> CreateClientCertStore( |
| 135 ResourceContext* resource_context); | 138 ResourceContext* resource_context); |
| 136 | 139 |
| 137 // Notification that a main frame load was aborted. The |request_loading_time| | 140 // Notification that a main frame load was aborted. The |request_loading_time| |
| 138 // parameter contains the time between the load request start and abort. | 141 // parameter contains the time between the load request start and abort. |
| 139 // Called on the IO thread. | 142 // Called on the IO thread. |
| 140 virtual void OnAbortedFrameLoad(const GURL& url, | 143 virtual void OnAbortedFrameLoad(const GURL& url, |
| 141 base::TimeDelta request_loading_time); | 144 base::TimeDelta request_loading_time); |
| 142 | 145 |
| 143 protected: | 146 protected: |
| 144 virtual ~ResourceDispatcherHostDelegate(); | 147 virtual ~ResourceDispatcherHostDelegate(); |
| 145 }; | 148 }; |
| 146 | 149 |
| 147 } // namespace content | 150 } // namespace content |
| 148 | 151 |
| 149 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 152 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| OLD | NEW |