Index: content/public/browser/navigation_handle.h |
diff --git a/content/public/browser/navigation_handle.h b/content/public/browser/navigation_handle.h |
index 0bfbca8c7115ebb8c566f501d010970fdd4f4a57..ed9a59a3b645a27160d364b70c64a630400c8d38 100644 |
--- a/content/public/browser/navigation_handle.h |
+++ b/content/public/browser/navigation_handle.h |
@@ -13,6 +13,10 @@ |
class GURL; |
+namespace net { |
+class HttpResponseHeaders; |
+} |
+ |
namespace content { |
class NavigationThrottle; |
class RenderFrameHost; |
@@ -32,6 +36,10 @@ class CONTENT_EXPORT NavigationHandle { |
// when encountering a server redirect. |
virtual const GURL& GetURL() = 0; |
+ // The original URL for this navigation. This is not modified, and may differ |
+ // from GetURL after the navigation encounters a server redirect. |
+ virtual const GURL& GetOriginalURL() = 0; |
+ |
// Whether the navigation is taking place in the main frame or in a subframe. |
// This remains constant over the navigation lifetime. |
virtual bool IsInMainFrame() = 0; |
@@ -70,6 +78,9 @@ class CONTENT_EXPORT NavigationHandle { |
// handlers. |
virtual bool IsExternalProtocol() = 0; |
+ // Whether this navigation originated from a prefetch. |
+ virtual bool IsPrefetch() = 0; |
+ |
// Navigation control flow -------------------------------------------------- |
// The net error code if an error happened prior to commit. Otherwise it will |
@@ -85,6 +96,12 @@ class CONTENT_EXPORT NavigationHandle { |
// before the navigation has committed. |
virtual bool IsSamePage() = 0; |
+ // Returns the response headers for the request. This can only be accessed |
+ // after a redirect was encountered or after the the navigation is ready to |
+ // commit. It should not be modified, as modifications will not be reflected |
+ // in the network stack. |
+ virtual const net::HttpResponseHeaders* GetResponseHeaders(); |
+ |
// Whether the navigation has committed. This returns true for either |
// successful commits or error pages that replace the previous page |
// (distinguished by |IsErrorPage|), and false for errors that leave the user |