OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_ | 5 #ifndef IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_ |
6 #define IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_ | 6 #define IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 static std::unique_ptr<NavigationItem> Create(); | 31 static std::unique_ptr<NavigationItem> Create(); |
32 | 32 |
33 // Page-related stuff -------------------------------------------------------- | 33 // Page-related stuff -------------------------------------------------------- |
34 | 34 |
35 // A unique ID is preserved across commits and redirects, which means that | 35 // A unique ID is preserved across commits and redirects, which means that |
36 // sometimes a NavigationEntry's unique ID needs to be set (e.g. when | 36 // sometimes a NavigationEntry's unique ID needs to be set (e.g. when |
37 // creating a committed entry to correspond to a to-be-deleted pending entry, | 37 // creating a committed entry to correspond to a to-be-deleted pending entry, |
38 // the pending entry's ID must be copied). | 38 // the pending entry's ID must be copied). |
39 virtual int GetUniqueID() const = 0; | 39 virtual int GetUniqueID() const = 0; |
40 | 40 |
| 41 // The original URL for the navigation request. This may differ from GetURL() |
| 42 // if a redirect occurs after attempting to load this original URL. |
| 43 virtual void SetOriginalRequestURL(const GURL& url) = 0; |
| 44 virtual const GURL& GetOriginalRequestURL() const = 0; |
| 45 |
41 // The actual URL of the page. For some about pages, this may be a scary | 46 // The actual URL of the page. For some about pages, this may be a scary |
42 // data: URL or something like that. Use GetVirtualURL() below for showing to | 47 // data: URL or something like that. Use GetVirtualURL() below for showing to |
43 // the user. | 48 // the user. |
44 virtual void SetURL(const GURL& url) = 0; | 49 virtual void SetURL(const GURL& url) = 0; |
45 virtual const GURL& GetURL() const = 0; | 50 virtual const GURL& GetURL() const = 0; |
46 | 51 |
47 // The referring URL. Can be empty. | 52 // The referring URL. Can be empty. |
48 virtual void SetReferrer(const Referrer& referrer) = 0; | 53 virtual void SetReferrer(const Referrer& referrer) = 0; |
49 virtual const Referrer& GetReferrer() const = 0; | 54 virtual const Referrer& GetReferrer() const = 0; |
50 | 55 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 virtual NSDictionary* GetHttpRequestHeaders() const = 0; | 120 virtual NSDictionary* GetHttpRequestHeaders() const = 0; |
116 | 121 |
117 // Adds headers from |additional_headers| to the item's http request headers. | 122 // Adds headers from |additional_headers| to the item's http request headers. |
118 // Existing headers with the same key will be overridden. | 123 // Existing headers with the same key will be overridden. |
119 virtual void AddHttpRequestHeaders(NSDictionary* additional_headers) = 0; | 124 virtual void AddHttpRequestHeaders(NSDictionary* additional_headers) = 0; |
120 }; | 125 }; |
121 | 126 |
122 } // namespace web | 127 } // namespace web |
123 | 128 |
124 #endif // IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_ | 129 #endif // IOS_WEB_PUBLIC_NAVIGATION_ITEM_H_ |
OLD | NEW |