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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted_memory.h" | |
11 #include "base/string16.h" | 10 #include "base/string16.h" |
12 #include "base/time.h" | 11 #include "base/time.h" |
13 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
14 #include "content/public/common/page_transition_types.h" | 13 #include "content/public/common/page_transition_types.h" |
15 #include "content/public/common/page_type.h" | 14 #include "content/public/common/page_type.h" |
16 #include "content/public/common/referrer.h" | 15 #include "content/public/common/referrer.h" |
| 16 #include "webkit/glue/resource_request_body.h" |
17 | 17 |
18 class GURL; | 18 class GURL; |
19 | 19 |
20 namespace content { | 20 namespace content { |
21 | 21 |
22 struct FaviconStatus; | 22 struct FaviconStatus; |
23 struct SSLStatus; | 23 struct SSLStatus; |
24 | 24 |
25 // A NavigationEntry is a data structure that captures all the information | 25 // A NavigationEntry is a data structure that captures all the information |
26 // required to recreate a browsing state. This includes some opaque binary | 26 // required to recreate a browsing state. This includes some opaque binary |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 virtual const GURL& GetUserTypedURL() const = 0; | 124 virtual const GURL& GetUserTypedURL() const = 0; |
125 | 125 |
126 // Post data is form data that was posted to get to this page. The data will | 126 // Post data is form data that was posted to get to this page. The data will |
127 // have to be reposted to reload the page properly. This flag indicates | 127 // have to be reposted to reload the page properly. This flag indicates |
128 // whether the page had post data. | 128 // whether the page had post data. |
129 // | 129 // |
130 // The actual post data is stored either in | 130 // The actual post data is stored either in |
131 // 1) browser_initiated_post_data when a new post data request is started. | 131 // 1) browser_initiated_post_data when a new post data request is started. |
132 // 2) content_state when a post request has started and is extracted by | 132 // 2) content_state when a post request has started and is extracted by |
133 // WebKit to actually make the request. | 133 // WebKit to actually make the request. |
| 134 // |
| 135 // For the Cross-Process POST navigation, this flag is still true but |
| 136 // the browser_initiated_post_data is pointed to an invalid address |
| 137 // in the swapped-out process. Make sure to check the pointer before use it. |
134 virtual void SetHasPostData(bool has_post_data) = 0; | 138 virtual void SetHasPostData(bool has_post_data) = 0; |
135 virtual bool GetHasPostData() const = 0; | 139 virtual bool GetHasPostData() const = 0; |
136 | 140 |
137 // The Post identifier associated with the page. | 141 // The Post identifier associated with the page. |
138 virtual void SetPostID(int64 post_id) = 0; | 142 virtual void SetPostID(int64 post_id) = 0; |
139 virtual int64 GetPostID() const = 0; | 143 virtual int64 GetPostID() const = 0; |
140 | 144 |
141 // Holds the raw post data of a browser initiated post request. | 145 // Holds the raw post data of a browser initiated post request. |
142 // For efficiency, this should be cleared when content_state is populated | 146 // For efficiency, this should be cleared when content_state is populated |
143 // since the data is duplicated. | 147 // since the data is duplicated. |
144 // Note, this field: | 148 // Note, this field: |
145 // 1) is not persisted in session restore. | 149 // 1) is not persisted in session restore. |
146 // 2) is shallow copied with the static copy Create method above. | 150 // 2) is shallow copied with the static copy Create method above. |
147 // 3) may be NULL so check before use. | 151 // 3) may be NULL so check before use. |
148 virtual void SetBrowserInitiatedPostData( | 152 virtual void SetBrowserInitiatedPostData( |
149 const base::RefCountedMemory* data) = 0; | 153 scoped_refptr<webkit_glue::ResourceRequestBody> data) = 0; |
150 virtual const base::RefCountedMemory* GetBrowserInitiatedPostData() const = 0; | 154 virtual const scoped_refptr<webkit_glue::ResourceRequestBody> |
| 155 GetBrowserInitiatedPostData() const = 0; |
151 | 156 |
152 // The favicon data and tracking information. See content::FaviconStatus. | 157 // The favicon data and tracking information. See content::FaviconStatus. |
153 virtual const FaviconStatus& GetFavicon() const = 0; | 158 virtual const FaviconStatus& GetFavicon() const = 0; |
154 virtual FaviconStatus& GetFavicon() = 0; | 159 virtual FaviconStatus& GetFavicon() = 0; |
155 | 160 |
156 // All the SSL flags and state. See content::SSLStatus. | 161 // All the SSL flags and state. See content::SSLStatus. |
157 virtual const SSLStatus& GetSSL() const = 0; | 162 virtual const SSLStatus& GetSSL() const = 0; |
158 virtual SSLStatus& GetSSL() = 0; | 163 virtual SSLStatus& GetSSL() = 0; |
159 | 164 |
160 // Store the URL that caused this NavigationEntry to be created. | 165 // Store the URL that caused this NavigationEntry to be created. |
(...skipping 19 matching lines...) Expand all Loading... |
180 | 185 |
181 // Used to specify if this entry should be able to access local file:// | 186 // Used to specify if this entry should be able to access local file:// |
182 // resources. | 187 // resources. |
183 virtual void SetCanLoadLocalResources(bool allow) = 0; | 188 virtual void SetCanLoadLocalResources(bool allow) = 0; |
184 virtual bool GetCanLoadLocalResources() const = 0; | 189 virtual bool GetCanLoadLocalResources() const = 0; |
185 }; | 190 }; |
186 | 191 |
187 } // namespace content | 192 } // namespace content |
188 | 193 |
189 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ | 194 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ |
OLD | NEW |