| 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_BROWSER_WEB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ |
| 6 #define CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/browser/site_instance_impl.h" | 10 #include "content/browser/site_instance_impl.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 virtual const FaviconStatus& GetFavicon() const OVERRIDE; | 64 virtual const FaviconStatus& GetFavicon() const OVERRIDE; |
| 65 virtual FaviconStatus& GetFavicon() OVERRIDE; | 65 virtual FaviconStatus& GetFavicon() OVERRIDE; |
| 66 virtual const SSLStatus& GetSSL() const OVERRIDE; | 66 virtual const SSLStatus& GetSSL() const OVERRIDE; |
| 67 virtual SSLStatus& GetSSL() OVERRIDE; | 67 virtual SSLStatus& GetSSL() OVERRIDE; |
| 68 virtual void SetOriginalRequestURL(const GURL& original_url) OVERRIDE; | 68 virtual void SetOriginalRequestURL(const GURL& original_url) OVERRIDE; |
| 69 virtual const GURL& GetOriginalRequestURL() const OVERRIDE; | 69 virtual const GURL& GetOriginalRequestURL() const OVERRIDE; |
| 70 virtual void SetIsOverridingUserAgent(bool override) OVERRIDE; | 70 virtual void SetIsOverridingUserAgent(bool override) OVERRIDE; |
| 71 virtual bool GetIsOverridingUserAgent() const OVERRIDE; | 71 virtual bool GetIsOverridingUserAgent() const OVERRIDE; |
| 72 virtual void SetTimestamp(base::Time timestamp) OVERRIDE; | 72 virtual void SetTimestamp(base::Time timestamp) OVERRIDE; |
| 73 virtual base::Time GetTimestamp() const OVERRIDE; | 73 virtual base::Time GetTimestamp() const OVERRIDE; |
| 74 virtual void SetHttpStatusCode(int http_status_code) OVERRIDE; |
| 75 virtual int GetHttpStatusCode() const OVERRIDE; |
| 74 | 76 |
| 75 void set_unique_id(int unique_id) { | 77 void set_unique_id(int unique_id) { |
| 76 unique_id_ = unique_id; | 78 unique_id_ = unique_id; |
| 77 } | 79 } |
| 78 | 80 |
| 79 // The SiteInstance tells us how to share sub-processes. This is a reference | 81 // The SiteInstance tells us how to share sub-processes. This is a reference |
| 80 // counted pointer to a shared site instance. | 82 // counted pointer to a shared site instance. |
| 81 // | 83 // |
| 82 // Note that the SiteInstance should usually not be changed after it is set, | 84 // Note that the SiteInstance should usually not be changed after it is set, |
| 83 // but this may happen if the NavigationEntry was cloned and needs to use a | 85 // but this may happen if the NavigationEntry was cloned and needs to use a |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 // Resets to false after commit. | 160 // Resets to false after commit. |
| 159 void set_is_cross_site_reload(bool is_cross_site_reload) { | 161 void set_is_cross_site_reload(bool is_cross_site_reload) { |
| 160 is_cross_site_reload_ = is_cross_site_reload; | 162 is_cross_site_reload_ = is_cross_site_reload; |
| 161 } | 163 } |
| 162 bool is_cross_site_reload() const { | 164 bool is_cross_site_reload() const { |
| 163 return is_cross_site_reload_; | 165 return is_cross_site_reload_; |
| 164 } | 166 } |
| 165 | 167 |
| 166 private: | 168 private: |
| 167 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 169 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
| 168 // Session/Tab restore save portions of this class so that it can be recreated | 170 // If you add a new field that needs to be persisted you must update |
| 169 // later. If you add a new field that needs to be persisted you'll have to | 171 // TabNavigation in session_types.h appropriately. |
| 170 // update SessionService/TabRestoreService appropriately. | |
| 171 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 172 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
| 172 | 173 |
| 173 // See the accessors above for descriptions. | 174 // See the accessors above for descriptions. |
| 174 int unique_id_; | 175 int unique_id_; |
| 175 scoped_refptr<SiteInstanceImpl> site_instance_; | 176 scoped_refptr<SiteInstanceImpl> site_instance_; |
| 176 PageType page_type_; | 177 PageType page_type_; |
| 177 GURL url_; | 178 GURL url_; |
| 178 Referrer referrer_; | 179 Referrer referrer_; |
| 179 GURL virtual_url_; | 180 GURL virtual_url_; |
| 180 bool update_virtual_url_with_url_; | 181 bool update_virtual_url_with_url_; |
| 181 string16 title_; | 182 string16 title_; |
| 182 FaviconStatus favicon_; | 183 FaviconStatus favicon_; |
| 183 std::string content_state_; | 184 std::string content_state_; |
| 184 int32 page_id_; | 185 int32 page_id_; |
| 185 SSLStatus ssl_; | 186 SSLStatus ssl_; |
| 186 PageTransition transition_type_; | 187 PageTransition transition_type_; |
| 187 GURL user_typed_url_; | 188 GURL user_typed_url_; |
| 188 bool has_post_data_; | 189 bool has_post_data_; |
| 189 int64 post_id_; | 190 int64 post_id_; |
| 190 RestoreType restore_type_; | 191 RestoreType restore_type_; |
| 191 GURL original_request_url_; | 192 GURL original_request_url_; |
| 192 bool is_overriding_user_agent_; | 193 bool is_overriding_user_agent_; |
| 193 base::Time timestamp_; | 194 base::Time timestamp_; |
| 195 int http_status_code_; |
| 194 | 196 |
| 195 // This member is not persisted with session restore because it is transient. | 197 // This member is not persisted with session restore because it is transient. |
| 196 // If the post request succeeds, this field is cleared since the same | 198 // If the post request succeeds, this field is cleared since the same |
| 197 // information is stored in |content_state_| above. It is also only shallow | 199 // information is stored in |content_state_| above. It is also only shallow |
| 198 // copied with compiler provided copy constructor. | 200 // copied with compiler provided copy constructor. |
| 199 scoped_refptr<const base::RefCountedMemory> browser_initiated_post_data_; | 201 scoped_refptr<const base::RefCountedMemory> browser_initiated_post_data_; |
| 200 | 202 |
| 201 // This member is not persisted with session restore. | 203 // This member is not persisted with session restore. |
| 202 std::string extra_headers_; | 204 std::string extra_headers_; |
| 203 | 205 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 230 // instance, instead of a new navigation. This value should not be persisted | 232 // instance, instead of a new navigation. This value should not be persisted |
| 231 // and is not needed after the entry commits. | 233 // and is not needed after the entry commits. |
| 232 bool is_cross_site_reload_; | 234 bool is_cross_site_reload_; |
| 233 | 235 |
| 234 // Copy and assignment is explicitly allowed for this class. | 236 // Copy and assignment is explicitly allowed for this class. |
| 235 }; | 237 }; |
| 236 | 238 |
| 237 } // namespace content | 239 } // namespace content |
| 238 | 240 |
| 239 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ | 241 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ |
| OLD | NEW |