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 <string> | 8 #include <string> |
| 9 #include <vector> | |
|
joth
2012/07/30 19:10:18
again not needed
boliu
2012/07/30 21:53:45
Done.
| |
| 9 | 10 |
| 11 #include "base/memory/ref_counted_memory.h" | |
| 10 #include "base/string16.h" | 12 #include "base/string16.h" |
| 11 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 12 #include "content/public/common/page_transition_types.h" | 14 #include "content/public/common/page_transition_types.h" |
| 13 #include "content/public/common/page_type.h" | 15 #include "content/public/common/page_type.h" |
| 14 #include "content/public/common/referrer.h" | 16 #include "content/public/common/referrer.h" |
| 15 | 17 |
| 16 class GURL; | 18 class GURL; |
| 17 | 19 |
| 18 namespace content { | 20 namespace content { |
| 19 | 21 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 118 // the name that the user things of the site as having. | 120 // the name that the user things of the site as having. |
| 119 // | 121 // |
| 120 // 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. |
| 121 // 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. |
| 122 virtual const GURL& GetUserTypedURL() const = 0; | 124 virtual const GURL& GetUserTypedURL() const = 0; |
| 123 | 125 |
| 124 // 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 |
| 125 // 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 |
| 126 // whether the page had post data. | 128 // whether the page had post data. |
| 127 // | 129 // |
| 128 // The actual post data is stored in the content_state and is extracted by | 130 // The actual post data is stored either in |
| 129 // WebKit to actually make the request. | 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 | |
| 133 // WebKit to actually make the request. | |
| 130 virtual void SetHasPostData(bool has_post_data) = 0; | 134 virtual void SetHasPostData(bool has_post_data) = 0; |
| 131 virtual bool GetHasPostData() const = 0; | 135 virtual bool GetHasPostData() const = 0; |
| 132 | 136 |
| 133 // The Post identifier associated with the page. | 137 // The Post identifier associated with the page. |
| 134 virtual void SetPostID(int64 post_id) = 0; | 138 virtual void SetPostID(int64 post_id) = 0; |
| 135 virtual int64 GetPostID() const = 0; | 139 virtual int64 GetPostID() const = 0; |
| 136 | 140 |
| 141 // Holds the raw post data of a browser initiated post request. | |
| 142 // For efficiency, this should be cleared when content_state is populated | |
| 143 // since the data is duplicated. Note this is not persisted in session | |
| 144 // restore and it is shallow copied with the copy Create above. | |
| 145 virtual void SetBrowserInitiatedPostData( | |
| 146 scoped_refptr<base::RefCountedBytes> data) = 0; | |
| 147 virtual const scoped_refptr<base::RefCountedBytes> | |
| 148 GetBrowserInitiatedPostData() const = 0; | |
|
joth
2012/07/30 19:10:18
input is raw pointer of const&
return type raw po
boliu
2012/07/30 21:53:45
Using const* instead of const& for Set so it is po
| |
| 149 | |
| 137 // The favicon data and tracking information. See content::FaviconStatus. | 150 // The favicon data and tracking information. See content::FaviconStatus. |
| 138 virtual const FaviconStatus& GetFavicon() const = 0; | 151 virtual const FaviconStatus& GetFavicon() const = 0; |
| 139 virtual FaviconStatus& GetFavicon() = 0; | 152 virtual FaviconStatus& GetFavicon() = 0; |
| 140 | 153 |
| 141 // All the SSL flags and state. See content::SSLStatus. | 154 // All the SSL flags and state. See content::SSLStatus. |
| 142 virtual const SSLStatus& GetSSL() const = 0; | 155 virtual const SSLStatus& GetSSL() const = 0; |
| 143 virtual SSLStatus& GetSSL() = 0; | 156 virtual SSLStatus& GetSSL() = 0; |
| 144 | 157 |
| 145 // Store the URL that caused this NavigationEntry to be created. | 158 // Store the URL that caused this NavigationEntry to be created. |
| 146 virtual void SetOriginalRequestURL(const GURL& original_url) = 0; | 159 virtual void SetOriginalRequestURL(const GURL& original_url) = 0; |
| 147 virtual const GURL& GetOriginalRequestURL() const = 0; | 160 virtual const GURL& GetOriginalRequestURL() const = 0; |
| 148 | 161 |
| 149 // Store whether or not we're overriding the user agent. | 162 // Store whether or not we're overriding the user agent. |
| 150 virtual void SetIsOverridingUserAgent(bool override) = 0; | 163 virtual void SetIsOverridingUserAgent(bool override) = 0; |
| 151 virtual bool GetIsOverridingUserAgent() const = 0; | 164 virtual bool GetIsOverridingUserAgent() const = 0; |
| 152 }; | 165 }; |
| 153 | 166 |
| 154 } // namespace content | 167 } // namespace content |
| 155 | 168 |
| 156 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ | 169 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_H_ |
| OLD | NEW |