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_NAVIGATION_ENTRY_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ | 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/memory/ref_counted_memory.h" | 13 #include "base/memory/ref_counted_memory.h" |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 17 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
| 18 #include "content/public/common/page_type.h" | 18 #include "content/public/common/page_type.h" |
| 19 #include "content/public/common/referrer.h" | 19 #include "content/public/common/referrer.h" |
| 20 #include "content/public/common/resource_request_body.h" | |
| 20 #include "ui/base/page_transition_types.h" | 21 #include "ui/base/page_transition_types.h" |
| 21 | 22 |
| 22 class GURL; | 23 class GURL; |
| 23 | 24 |
| 24 namespace content { | 25 namespace content { |
| 25 | 26 |
| 26 class PageState; | 27 class PageState; |
| 27 struct FaviconStatus; | 28 struct FaviconStatus; |
| 28 struct SSLStatus; | 29 struct SSLStatus; |
| 29 | 30 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 // | 133 // |
| 133 // This URL will be is_empty() if the URL was navigated to some other way. | 134 // This URL will be is_empty() if the URL was navigated to some other way. |
| 134 // Callers should fall back on using the regular or display URL in this case. | 135 // Callers should fall back on using the regular or display URL in this case. |
| 135 virtual const GURL& GetUserTypedURL() const = 0; | 136 virtual const GURL& GetUserTypedURL() const = 0; |
| 136 | 137 |
| 137 // Post data is form data that was posted to get to this page. The data will | 138 // Post data is form data that was posted to get to this page. The data will |
| 138 // have to be reposted to reload the page properly. This flag indicates | 139 // have to be reposted to reload the page properly. This flag indicates |
| 139 // whether the page had post data. | 140 // whether the page had post data. |
| 140 // | 141 // |
| 141 // The actual post data is stored either in | 142 // The actual post data is stored either in |
| 142 // 1) browser_initiated_post_data when a new post data request is started. | 143 // 1) post_data when a new post data request is started. |
| 143 // 2) content_state when a post request has started and is extracted by | 144 // 2) content_state when a post request has started and is extracted by |
|
Charlie Reis
2016/06/10 20:59:28
PageState
Łukasz Anforowicz
2016/06/13 18:01:11
Done.
| |
| 144 // WebKit to actually make the request. | 145 // WebKit to actually make the request. |
| 145 virtual void SetHasPostData(bool has_post_data) = 0; | 146 virtual void SetHasPostData(bool has_post_data) = 0; |
| 146 virtual bool GetHasPostData() const = 0; | 147 virtual bool GetHasPostData() const = 0; |
| 147 | 148 |
| 148 // The Post identifier associated with the page. | 149 // The Post identifier associated with the page. |
| 149 virtual void SetPostID(int64_t post_id) = 0; | 150 virtual void SetPostID(int64_t post_id) = 0; |
| 150 virtual int64_t GetPostID() const = 0; | 151 virtual int64_t GetPostID() const = 0; |
| 151 | 152 |
| 152 // Holds the raw post data of a browser initiated post request. | 153 // Holds the raw post data of a post request. |
| 153 // For efficiency, this should be cleared when content_state is populated | 154 // For efficiency, this should be cleared when content_state is populated |
|
Charlie Reis
2016/06/10 20:59:28
PageState
Łukasz Anforowicz
2016/06/13 18:01:11
Done.
| |
| 154 // since the data is duplicated. | 155 // since the data is duplicated. |
| 155 // Note, this field: | 156 // Note, this field: |
| 156 // 1) is not persisted in session restore. | 157 // 1) is not persisted in session restore. |
| 157 // 2) is shallow copied with the static copy Create method above. | 158 // 2) is shallow copied with the static copy Create method above. |
| 158 // 3) may be nullptr so check before use. | 159 // 3) may be nullptr so check before use. |
| 159 virtual void SetBrowserInitiatedPostData( | 160 virtual void SetPostData(const scoped_refptr<ResourceRequestBody>& data) = 0; |
| 160 const base::RefCountedMemory* data) = 0; | 161 virtual scoped_refptr<ResourceRequestBody> GetPostData() const = 0; |
| 161 virtual const base::RefCountedMemory* GetBrowserInitiatedPostData() const = 0; | |
| 162 | 162 |
| 163 // The favicon data and tracking information. See content::FaviconStatus. | 163 // The favicon data and tracking information. See content::FaviconStatus. |
| 164 virtual const FaviconStatus& GetFavicon() const = 0; | 164 virtual const FaviconStatus& GetFavicon() const = 0; |
| 165 virtual FaviconStatus& GetFavicon() = 0; | 165 virtual FaviconStatus& GetFavicon() = 0; |
| 166 | 166 |
| 167 // All the SSL flags and state. See content::SSLStatus. | 167 // All the SSL flags and state. See content::SSLStatus. |
| 168 virtual const SSLStatus& GetSSL() const = 0; | 168 virtual const SSLStatus& GetSSL() const = 0; |
| 169 virtual SSLStatus& GetSSL() = 0; | 169 virtual SSLStatus& GetSSL() = 0; |
| 170 | 170 |
| 171 // Store the URL that caused this NavigationEntry to be created. | 171 // Store the URL that caused this NavigationEntry to be created. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 219 virtual void SetRedirectChain(const std::vector<GURL>& redirects) = 0; | 219 virtual void SetRedirectChain(const std::vector<GURL>& redirects) = 0; |
| 220 virtual const std::vector<GURL>& GetRedirectChain() const = 0; | 220 virtual const std::vector<GURL>& GetRedirectChain() const = 0; |
| 221 | 221 |
| 222 // True if this entry is restored and hasn't been loaded. | 222 // True if this entry is restored and hasn't been loaded. |
| 223 virtual bool IsRestored() const = 0; | 223 virtual bool IsRestored() const = 0; |
| 224 }; | 224 }; |
| 225 | 225 |
| 226 } // namespace content | 226 } // namespace content |
| 227 | 227 |
| 228 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ | 228 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ |
| OLD | NEW |