OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include <stdint.h> |
| 9 |
| 10 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
11 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "build/build_config.h" |
12 #include "content/browser/frame_host/frame_navigation_entry.h" | 15 #include "content/browser/frame_host/frame_navigation_entry.h" |
13 #include "content/browser/frame_host/frame_tree_node.h" | 16 #include "content/browser/frame_host/frame_tree_node.h" |
14 #include "content/browser/site_instance_impl.h" | 17 #include "content/browser/site_instance_impl.h" |
15 #include "content/common/frame_message_enums.h" | 18 #include "content/common/frame_message_enums.h" |
16 #include "content/public/browser/favicon_status.h" | 19 #include "content/public/browser/favicon_status.h" |
17 #include "content/public/browser/global_request_id.h" | 20 #include "content/public/browser/global_request_id.h" |
18 #include "content/public/browser/navigation_entry.h" | 21 #include "content/public/browser/navigation_entry.h" |
19 #include "content/public/common/page_state.h" | 22 #include "content/public/common/page_state.h" |
20 #include "content/public/common/ssl_status.h" | 23 #include "content/public/common/ssl_status.h" |
21 | 24 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 #endif | 93 #endif |
91 void SetReferrer(const Referrer& referrer) override; | 94 void SetReferrer(const Referrer& referrer) override; |
92 const Referrer& GetReferrer() const override; | 95 const Referrer& GetReferrer() const override; |
93 void SetVirtualURL(const GURL& url) override; | 96 void SetVirtualURL(const GURL& url) override; |
94 const GURL& GetVirtualURL() const override; | 97 const GURL& GetVirtualURL() const override; |
95 void SetTitle(const base::string16& title) override; | 98 void SetTitle(const base::string16& title) override; |
96 const base::string16& GetTitle() const override; | 99 const base::string16& GetTitle() const override; |
97 void SetPageState(const PageState& state) override; | 100 void SetPageState(const PageState& state) override; |
98 PageState GetPageState() const override; | 101 PageState GetPageState() const override; |
99 void SetPageID(int page_id) override; | 102 void SetPageID(int page_id) override; |
100 int32 GetPageID() const override; | 103 int32_t GetPageID() const override; |
101 const base::string16& GetTitleForDisplay( | 104 const base::string16& GetTitleForDisplay( |
102 const std::string& languages) const override; | 105 const std::string& languages) const override; |
103 bool IsViewSourceMode() const override; | 106 bool IsViewSourceMode() const override; |
104 void SetTransitionType(ui::PageTransition transition_type) override; | 107 void SetTransitionType(ui::PageTransition transition_type) override; |
105 ui::PageTransition GetTransitionType() const override; | 108 ui::PageTransition GetTransitionType() const override; |
106 const GURL& GetUserTypedURL() const override; | 109 const GURL& GetUserTypedURL() const override; |
107 void SetHasPostData(bool has_post_data) override; | 110 void SetHasPostData(bool has_post_data) override; |
108 bool GetHasPostData() const override; | 111 bool GetHasPostData() const override; |
109 void SetPostID(int64 post_id) override; | 112 void SetPostID(int64_t post_id) override; |
110 int64 GetPostID() const override; | 113 int64_t GetPostID() const override; |
111 void SetBrowserInitiatedPostData(const base::RefCountedMemory* data) override; | 114 void SetBrowserInitiatedPostData(const base::RefCountedMemory* data) override; |
112 const base::RefCountedMemory* GetBrowserInitiatedPostData() const override; | 115 const base::RefCountedMemory* GetBrowserInitiatedPostData() const override; |
113 const FaviconStatus& GetFavicon() const override; | 116 const FaviconStatus& GetFavicon() const override; |
114 FaviconStatus& GetFavicon() override; | 117 FaviconStatus& GetFavicon() override; |
115 const SSLStatus& GetSSL() const override; | 118 const SSLStatus& GetSSL() const override; |
116 SSLStatus& GetSSL() override; | 119 SSLStatus& GetSSL() override; |
117 void SetOriginalRequestURL(const GURL& original_url) override; | 120 void SetOriginalRequestURL(const GURL& original_url) override; |
118 const GURL& GetOriginalRequestURL() const override; | 121 const GURL& GetOriginalRequestURL() const override; |
119 void SetIsOverridingUserAgent(bool override) override; | 122 void SetIsOverridingUserAgent(bool override) override; |
120 bool GetIsOverridingUserAgent() const override; | 123 bool GetIsOverridingUserAgent() const override; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 } | 183 } |
181 | 184 |
182 // Finds the TreeNode associated with |frame_tree_node_id| to add or update | 185 // Finds the TreeNode associated with |frame_tree_node_id| to add or update |
183 // its FrameNavigationEntry. A new FrameNavigationEntry is added if none | 186 // its FrameNavigationEntry. A new FrameNavigationEntry is added if none |
184 // exists, or else the existing one (which might be shared with other | 187 // exists, or else the existing one (which might be shared with other |
185 // NavigationEntries) is updated with the given parameters. | 188 // NavigationEntries) is updated with the given parameters. |
186 // Does nothing if there is no entry already and |url| is about:blank, since | 189 // Does nothing if there is no entry already and |url| is about:blank, since |
187 // that does not count as a real commit. | 190 // that does not count as a real commit. |
188 void AddOrUpdateFrameEntry(FrameTreeNode* frame_tree_node, | 191 void AddOrUpdateFrameEntry(FrameTreeNode* frame_tree_node, |
189 const std::string& frame_unique_name, | 192 const std::string& frame_unique_name, |
190 int64 item_sequence_number, | 193 int64_t item_sequence_number, |
191 int64 document_sequence_number, | 194 int64_t document_sequence_number, |
192 SiteInstanceImpl* site_instance, | 195 SiteInstanceImpl* site_instance, |
193 const GURL& url, | 196 const GURL& url, |
194 const Referrer& referrer, | 197 const Referrer& referrer, |
195 const PageState& page_state); | 198 const PageState& page_state); |
196 | 199 |
197 // Returns the FrameNavigationEntry corresponding to |frame_tree_node|, if | 200 // Returns the FrameNavigationEntry corresponding to |frame_tree_node|, if |
198 // there is one in this NavigationEntry. | 201 // there is one in this NavigationEntry. |
199 FrameNavigationEntry* GetFrameEntry(FrameTreeNode* frame_tree_node) const; | 202 FrameNavigationEntry* GetFrameEntry(FrameTreeNode* frame_tree_node) const; |
200 | 203 |
201 // Returns the FrameNavigationEntry corresponding to the frame with the given | 204 // Returns the FrameNavigationEntry corresponding to the frame with the given |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 | 384 |
382 // See the accessors above for descriptions. | 385 // See the accessors above for descriptions. |
383 int unique_id_; | 386 int unique_id_; |
384 // TODO(creis): Persist bindings_. http://crbug.com/173672. | 387 // TODO(creis): Persist bindings_. http://crbug.com/173672. |
385 int bindings_; | 388 int bindings_; |
386 PageType page_type_; | 389 PageType page_type_; |
387 GURL virtual_url_; | 390 GURL virtual_url_; |
388 bool update_virtual_url_with_url_; | 391 bool update_virtual_url_with_url_; |
389 base::string16 title_; | 392 base::string16 title_; |
390 FaviconStatus favicon_; | 393 FaviconStatus favicon_; |
391 int32 page_id_; | 394 int32_t page_id_; |
392 SSLStatus ssl_; | 395 SSLStatus ssl_; |
393 ui::PageTransition transition_type_; | 396 ui::PageTransition transition_type_; |
394 GURL user_typed_url_; | 397 GURL user_typed_url_; |
395 bool has_post_data_; | 398 bool has_post_data_; |
396 int64 post_id_; | 399 int64_t post_id_; |
397 RestoreType restore_type_; | 400 RestoreType restore_type_; |
398 GURL original_request_url_; | 401 GURL original_request_url_; |
399 bool is_overriding_user_agent_; | 402 bool is_overriding_user_agent_; |
400 base::Time timestamp_; | 403 base::Time timestamp_; |
401 int http_status_code_; | 404 int http_status_code_; |
402 | 405 |
403 // This member is not persisted with session restore because it is transient. | 406 // This member is not persisted with session restore because it is transient. |
404 // If the post request succeeds, this field is cleared since the same | 407 // If the post request succeeds, this field is cleared since the same |
405 // information is stored in |content_state_| above. It is also only shallow | 408 // information is stored in |content_state_| above. It is also only shallow |
406 // copied with compiler provided copy constructor. | 409 // copied with compiler provided copy constructor. |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 // persisted, unless specific data is taken out/put back in at save/restore | 503 // persisted, unless specific data is taken out/put back in at save/restore |
501 // time (see TabNavigation for an example of this). | 504 // time (see TabNavigation for an example of this). |
502 std::map<std::string, base::string16> extra_data_; | 505 std::map<std::string, base::string16> extra_data_; |
503 | 506 |
504 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); | 507 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); |
505 }; | 508 }; |
506 | 509 |
507 } // namespace content | 510 } // namespace content |
508 | 511 |
509 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 512 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
OLD | NEW |