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_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" |
| 11 #include "content/public/browser/favicon_status.h" | 11 #include "content/public/browser/favicon_status.h" |
| 12 #include "content/public/browser/global_request_id.h" | 12 #include "content/public/browser/global_request_id.h" |
| 13 #include "content/public/browser/navigation_entry.h" | 13 #include "content/public/browser/navigation_entry.h" |
| 14 #include "content/public/common/frame_navigate_params.h" | |
| 14 #include "content/public/common/ssl_status.h" | 15 #include "content/public/common/ssl_status.h" |
| 15 | 16 |
| 16 namespace content { | 17 namespace content { |
| 18 struct ViewMsg_Request; | |
|
michaeln
2012/11/02 00:08:23
since this struct is defined in frame_navigate_par
irobert
2012/11/02 17:22:55
Done.
| |
| 17 | 19 |
| 18 class CONTENT_EXPORT NavigationEntryImpl | 20 class CONTENT_EXPORT NavigationEntryImpl |
| 19 : public NON_EXPORTED_BASE(NavigationEntry) { | 21 : public NON_EXPORTED_BASE(NavigationEntry) { |
| 20 public: | 22 public: |
| 21 static NavigationEntryImpl* FromNavigationEntry(NavigationEntry* entry); | 23 static NavigationEntryImpl* FromNavigationEntry(NavigationEntry* entry); |
| 22 | 24 |
| 23 NavigationEntryImpl(); | 25 NavigationEntryImpl(); |
| 24 NavigationEntryImpl(SiteInstanceImpl* instance, | 26 NavigationEntryImpl(SiteInstanceImpl* instance, |
| 25 int page_id, | 27 int page_id, |
| 26 const GURL& url, | 28 const GURL& url, |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 159 | 161 |
| 160 // Whether this (pending) navigation is reload across site instances. | 162 // Whether this (pending) navigation is reload across site instances. |
| 161 // Resets to false after commit. | 163 // Resets to false after commit. |
| 162 void set_is_cross_site_reload(bool is_cross_site_reload) { | 164 void set_is_cross_site_reload(bool is_cross_site_reload) { |
| 163 is_cross_site_reload_ = is_cross_site_reload; | 165 is_cross_site_reload_ = is_cross_site_reload; |
| 164 } | 166 } |
| 165 bool is_cross_site_reload() const { | 167 bool is_cross_site_reload() const { |
| 166 return is_cross_site_reload_; | 168 return is_cross_site_reload_; |
| 167 } | 169 } |
| 168 | 170 |
| 171 // request | |
| 172 ViewMsg_Request request; | |
|
michaeln
2012/11/02 00:08:23
nits: we put trailing underbars on data members_ a
michaeln
2012/11/02 00:08:23
Also, ditto comments about overlap with the existi
irobert
2012/11/02 17:22:55
Done.
| |
| 173 | |
| 169 private: | 174 private: |
| 170 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 175 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
| 171 // Session/Tab restore save portions of this class so that it can be recreated | 176 // Session/Tab restore save portions of this class so that it can be recreated |
| 172 // later. If you add a new field that needs to be persisted you'll have to | 177 // later. If you add a new field that needs to be persisted you'll have to |
| 173 // update SessionService/TabRestoreService appropriately. | 178 // update SessionService/TabRestoreService appropriately. |
| 174 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 179 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
| 175 | 180 |
| 176 // See the accessors above for descriptions. | 181 // See the accessors above for descriptions. |
| 177 int unique_id_; | 182 int unique_id_; |
| 178 scoped_refptr<SiteInstanceImpl> site_instance_; | 183 scoped_refptr<SiteInstanceImpl> site_instance_; |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 192 int64 post_id_; | 197 int64 post_id_; |
| 193 RestoreType restore_type_; | 198 RestoreType restore_type_; |
| 194 GURL original_request_url_; | 199 GURL original_request_url_; |
| 195 bool is_overriding_user_agent_; | 200 bool is_overriding_user_agent_; |
| 196 base::Time timestamp_; | 201 base::Time timestamp_; |
| 197 | 202 |
| 198 // This member is not persisted with session restore because it is transient. | 203 // This member is not persisted with session restore because it is transient. |
| 199 // If the post request succeeds, this field is cleared since the same | 204 // If the post request succeeds, this field is cleared since the same |
| 200 // information is stored in |content_state_| above. It is also only shallow | 205 // information is stored in |content_state_| above. It is also only shallow |
| 201 // copied with compiler provided copy constructor. | 206 // copied with compiler provided copy constructor. |
| 202 scoped_refptr<const base::RefCountedMemory> browser_initiated_post_data_; | 207 scoped_refptr<const base::RefCountedMemory> browser_initiated_post_data_; |
|
michaeln
2012/11/02 00:08:23
I think you may want to harmonize your new more ex
irobert
2012/11/02 17:22:55
We also reviewed the browser_initiated_post_data,
Charlie Reis
2012/11/05 16:21:40
The browser_initiated_post_data_ stuff is for Andr
| |
| 203 | 208 |
| 204 // This member is not persisted with session restore. | 209 // This member is not persisted with session restore. |
| 205 std::string extra_headers_; | 210 std::string extra_headers_; |
| 206 | 211 |
| 207 // Used for specifying base URL for pages loaded via data URLs. Not persisted. | 212 // Used for specifying base URL for pages loaded via data URLs. Not persisted. |
| 208 GURL base_url_for_data_url_; | 213 GURL base_url_for_data_url_; |
| 209 | 214 |
| 210 // Whether the entry, while loading, was created for a renderer-initiated | 215 // Whether the entry, while loading, was created for a renderer-initiated |
| 211 // navigation. This dictates whether the URL should be displayed before the | 216 // navigation. This dictates whether the URL should be displayed before the |
| 212 // navigation commits. It is cleared on commit and not persisted. | 217 // navigation commits. It is cleared on commit and not persisted. |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 237 // Set when this entry should be able to access local file:// resources. This | 242 // Set when this entry should be able to access local file:// resources. This |
| 238 // value is not needed after the entry commits and is not persisted. | 243 // value is not needed after the entry commits and is not persisted. |
| 239 bool can_load_local_resources_; | 244 bool can_load_local_resources_; |
| 240 | 245 |
| 241 // Copy and assignment is explicitly allowed for this class. | 246 // Copy and assignment is explicitly allowed for this class. |
| 242 }; | 247 }; |
| 243 | 248 |
| 244 } // namespace content | 249 } // namespace content |
| 245 | 250 |
| 246 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ | 251 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ |
| OLD | NEW |