OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_NAVIGATION_HANDLE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 #include "content/public/browser/navigation_throttle.h" | 12 #include "content/public/browser/navigation_throttle.h" |
13 #include "content/public/browser/reload_type.h" | 13 #include "content/public/browser/reload_type.h" |
14 #include "content/public/common/referrer.h" | 14 #include "content/public/common/referrer.h" |
15 #include "net/base/host_port_pair.h" | |
15 #include "net/base/net_errors.h" | 16 #include "net/base/net_errors.h" |
16 #include "net/http/http_response_info.h" | 17 #include "net/http/http_response_info.h" |
17 #include "ui/base/page_transition_types.h" | 18 #include "ui/base/page_transition_types.h" |
18 | 19 |
19 class GURL; | 20 class GURL; |
20 | 21 |
21 namespace net { | 22 namespace net { |
22 class HttpResponseHeaders; | 23 class HttpResponseHeaders; |
23 } // namespace net | 24 } // namespace net |
24 | 25 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
169 // successful commits or error pages that replace the previous page | 170 // successful commits or error pages that replace the previous page |
170 // (distinguished by |IsErrorPage|), and false for errors that leave the user | 171 // (distinguished by |IsErrorPage|), and false for errors that leave the user |
171 // on the previous page. | 172 // on the previous page. |
172 virtual bool HasCommitted() = 0; | 173 virtual bool HasCommitted() = 0; |
173 | 174 |
174 // Whether the navigation resulted in an error page. | 175 // Whether the navigation resulted in an error page. |
175 // Note that if an error page reloads, this will return true even though | 176 // Note that if an error page reloads, this will return true even though |
176 // GetNetErrorCode will be net::OK. | 177 // GetNetErrorCode will be net::OK. |
177 virtual bool IsErrorPage() = 0; | 178 virtual bool IsErrorPage() = 0; |
178 | 179 |
180 // Returns the remote address of the socket which fetched this resource. | |
181 virtual net::HostPortPair GetSocketAddress() = 0; | |
jam
2017/01/31 23:59:44
this is used by safe browsing code (outside of con
nasko
2017/02/02 16:18:37
But I don't see changes in chrome/ in this CL. Can
jam
2017/02/03 05:26:56
Right, I'm landing each conversion separately to m
| |
182 | |
179 // Returns the response headers for the request, or nullptr if there aren't | 183 // Returns the response headers for the request, or nullptr if there aren't |
180 // any response headers or they have not been received yet. The response | 184 // any response headers or they have not been received yet. The response |
181 // headers may change during the navigation (e.g. after encountering a server | 185 // headers may change during the navigation (e.g. after encountering a server |
182 // redirect). The headers returned should not be modified, as modifications | 186 // redirect). The headers returned should not be modified, as modifications |
183 // will not be reflected in the network stack. | 187 // will not be reflected in the network stack. |
184 virtual const net::HttpResponseHeaders* GetResponseHeaders() = 0; | 188 virtual const net::HttpResponseHeaders* GetResponseHeaders() = 0; |
185 | 189 |
186 // Returns the connection info for the request, the default value is | 190 // Returns the connection info for the request, the default value is |
187 // CONNECTION_INFO_UNKNOWN if there hasn't been a response (or redirect) | 191 // CONNECTION_INFO_UNKNOWN if there hasn't been a response (or redirect) |
188 // yet. The connection info may change during the navigation (e.g. after | 192 // yet. The connection info may change during the navigation (e.g. after |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
256 | 260 |
257 // The NavigationData that the embedder returned from | 261 // The NavigationData that the embedder returned from |
258 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will | 262 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will |
259 // be a clone of the NavigationData. | 263 // be a clone of the NavigationData. |
260 virtual NavigationData* GetNavigationData() = 0; | 264 virtual NavigationData* GetNavigationData() = 0; |
261 }; | 265 }; |
262 | 266 |
263 } // namespace content | 267 } // namespace content |
264 | 268 |
265 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 269 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
OLD | NEW |