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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
121 // | 121 // |
122 // This URL will be is_empty() if the URL was navigated to some other way. | 122 // This URL will be is_empty() if the URL was navigated to some other way. |
123 // Callers should fall back on using the regular or display URL in this case. | 123 // Callers should fall back on using the regular or display URL in this case. |
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. |
Charlie Reis
2012/11/20 05:46:03
We may want to update this comment as well.
irobert
2012/11/22 01:37:00
Done.
| |
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 virtual void SetHasPostData(bool has_post_data) = 0; | 134 virtual void SetHasPostData(bool has_post_data) = 0; |
135 virtual bool GetHasPostData() const = 0; | 135 virtual bool GetHasPostData() const = 0; |
136 | 136 |
137 // The Post identifier associated with the page. | 137 // The Post identifier associated with the page. |
138 virtual void SetPostID(int64 post_id) = 0; | 138 virtual void SetPostID(int64 post_id) = 0; |
139 virtual int64 GetPostID() const = 0; | 139 virtual int64 GetPostID() const = 0; |
140 | 140 |
141 // Holds the raw post data of a browser initiated post request. | 141 // Holds the raw post data of a browser initiated post request. |
142 // For efficiency, this should be cleared when content_state is populated | 142 // For efficiency, this should be cleared when content_state is populated |
143 // since the data is duplicated. | 143 // since the data is duplicated. |
144 // Note, this field: | 144 // Note, this field: |
145 // 1) is not persisted in session restore. | 145 // 1) is not persisted in session restore. |
146 // 2) is shallow copied with the static copy Create method above. | 146 // 2) is shallow copied with the static copy Create method above. |
147 // 3) may be NULL so check before use. | 147 // 3) may be NULL so check before use. |
148 virtual void SetBrowserInitiatedPostData( | 148 virtual void SetBrowserInitiatedPostData( |
149 const base::RefCountedMemory* data) = 0; | 149 scoped_refptr<webkit_glue::ResourceRequestBody> data) = 0; |
150 virtual const base::RefCountedMemory* GetBrowserInitiatedPostData() const = 0; | 150 virtual const scoped_refptr<webkit_glue::ResourceRequestBody> |
151 GetBrowserInitiatedPostData() const = 0; | |
151 | 152 |
152 // The favicon data and tracking information. See content::FaviconStatus. | 153 // The favicon data and tracking information. See content::FaviconStatus. |
153 virtual const FaviconStatus& GetFavicon() const = 0; | 154 virtual const FaviconStatus& GetFavicon() const = 0; |
154 virtual FaviconStatus& GetFavicon() = 0; | 155 virtual FaviconStatus& GetFavicon() = 0; |
155 | 156 |
156 // All the SSL flags and state. See content::SSLStatus. | 157 // All the SSL flags and state. See content::SSLStatus. |
157 virtual const SSLStatus& GetSSL() const = 0; | 158 virtual const SSLStatus& GetSSL() const = 0; |
158 virtual SSLStatus& GetSSL() = 0; | 159 virtual SSLStatus& GetSSL() = 0; |
159 | 160 |
160 // Store the URL that caused this NavigationEntry to be created. | 161 // Store the URL that caused this NavigationEntry to be created. |
(...skipping 19 matching lines...) Expand all Loading... | |
180 | 181 |
181 // Used to specify if this entry should be able to access local file:// | 182 // Used to specify if this entry should be able to access local file:// |
182 // resources. | 183 // resources. |
183 virtual void SetCanLoadLocalResources(bool allow) = 0; | 184 virtual void SetCanLoadLocalResources(bool allow) = 0; |
184 virtual bool GetCanLoadLocalResources() const = 0; | 185 virtual bool GetCanLoadLocalResources() const = 0; |
185 }; | 186 }; |
186 | 187 |
187 } // namespace content | 188 } // namespace content |
188 | 189 |
189 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ | 190 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ |
OLD | NEW |