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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 net::URLRequest* request, | 114 net::URLRequest* request, |
| 115 ResourceContext* resource_context, | 115 ResourceContext* resource_context, |
| 116 ResourceResponse* response); | 116 ResourceResponse* response); |
| 117 | 117 |
| 118 // Notification that a request has completed. | 118 // Notification that a request has completed. |
| 119 virtual void RequestComplete(net::URLRequest* url_request, int net_error); | 119 virtual void RequestComplete(net::URLRequest* url_request, int net_error); |
| 120 // Deprecated. | 120 // Deprecated. |
| 121 // TODO(maksims): Remove this once all the callers are modified. | 121 // TODO(maksims): Remove this once all the callers are modified. |
| 122 virtual void RequestComplete(net::URLRequest* url_request); | 122 virtual void RequestComplete(net::URLRequest* url_request); |
| 123 | 123 |
| 124 // Asks the embedder if Lo-Fi mode should be enabled for the given request. It | 124 // Asks the embedder for the Previews State which says which previews should |
|
nasko
2016/12/08 22:19:33
nit: PreviewsState
megjablon
2016/12/09 20:35:54
Done.
| |
| 125 // is only called for requests with an unspecified Lo-Fi value. | 125 // be enabled for the given request. It is only called for requests with an |
| 126 virtual bool ShouldEnableLoFiMode(const net::URLRequest& url_request, | 126 // unspecified Previews state of zero. |
|
nasko
2016/12/08 22:19:33
The state is not zero, it has a meaningful name. Z
megjablon
2016/12/09 20:35:54
Done.
| |
| 127 content::ResourceContext* resource_context); | 127 virtual int GetPreviewsState(const net::URLRequest& url_request, |
|
nasko
2016/12/08 22:19:33
Why isn't the return value PreviewsState?
megjablon
2016/12/09 20:35:55
Done.
| |
| 128 content::ResourceContext* resource_context); | |
| 128 | 129 |
| 129 // Asks the embedder for NavigationData related to this request. It is only | 130 // Asks the embedder for NavigationData related to this request. It is only |
| 130 // called for navigation requests. | 131 // called for navigation requests. |
| 131 virtual NavigationData* GetNavigationData(net::URLRequest* request) const; | 132 virtual NavigationData* GetNavigationData(net::URLRequest* request) const; |
| 132 | 133 |
| 133 // Get platform ClientCertStore. May return nullptr. | 134 // Get platform ClientCertStore. May return nullptr. |
| 134 virtual std::unique_ptr<net::ClientCertStore> CreateClientCertStore( | 135 virtual std::unique_ptr<net::ClientCertStore> CreateClientCertStore( |
| 135 ResourceContext* resource_context); | 136 ResourceContext* resource_context); |
| 136 | 137 |
| 137 // Notification that a main frame load was aborted. The |request_loading_time| | 138 // Notification that a main frame load was aborted. The |request_loading_time| |
| 138 // parameter contains the time between the load request start and abort. | 139 // parameter contains the time between the load request start and abort. |
| 139 // Called on the IO thread. | 140 // Called on the IO thread. |
| 140 virtual void OnAbortedFrameLoad(const GURL& url, | 141 virtual void OnAbortedFrameLoad(const GURL& url, |
| 141 base::TimeDelta request_loading_time); | 142 base::TimeDelta request_loading_time); |
| 142 | 143 |
| 143 protected: | 144 protected: |
| 144 virtual ~ResourceDispatcherHostDelegate(); | 145 virtual ~ResourceDispatcherHostDelegate(); |
| 145 }; | 146 }; |
| 146 | 147 |
| 147 } // namespace content | 148 } // namespace content |
| 148 | 149 |
| 149 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 150 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| OLD | NEW |