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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <memory> | 11 #include <memory> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
18 #include "content/browser/frame_host/frame_navigation_entry.h" | 18 #include "content/browser/frame_host/frame_navigation_entry.h" |
19 #include "content/browser/frame_host/frame_tree_node.h" | 19 #include "content/browser/frame_host/frame_tree_node.h" |
20 #include "content/browser/site_instance_impl.h" | 20 #include "content/browser/site_instance_impl.h" |
21 #include "content/common/frame_message_enums.h" | 21 #include "content/common/frame_message_enums.h" |
22 #include "content/common/resource_request_body_impl.h" | |
23 #include "content/public/browser/favicon_status.h" | 22 #include "content/public/browser/favicon_status.h" |
24 #include "content/public/browser/global_request_id.h" | 23 #include "content/public/browser/global_request_id.h" |
25 #include "content/public/browser/navigation_entry.h" | 24 #include "content/public/browser/navigation_entry.h" |
26 #include "content/public/browser/reload_type.h" | 25 #include "content/public/browser/reload_type.h" |
27 #include "content/public/browser/restore_type.h" | 26 #include "content/public/browser/restore_type.h" |
28 #include "content/public/browser/ssl_status.h" | 27 #include "content/public/browser/ssl_status.h" |
29 #include "content/public/common/page_state.h" | 28 #include "content/public/common/page_state.h" |
30 #include "content/public/common/previews_state.h" | 29 #include "content/public/common/previews_state.h" |
| 30 #include "content/public/common/resource_request_body.h" |
31 | 31 |
32 namespace content { | 32 namespace content { |
33 class ResourceRequestBodyImpl; | 33 class ResourceRequestBody; |
34 struct CommonNavigationParams; | 34 struct CommonNavigationParams; |
35 struct RequestNavigationParams; | 35 struct RequestNavigationParams; |
36 struct StartNavigationParams; | 36 struct StartNavigationParams; |
37 | 37 |
38 class CONTENT_EXPORT NavigationEntryImpl | 38 class CONTENT_EXPORT NavigationEntryImpl |
39 : public NON_EXPORTED_BASE(NavigationEntry) { | 39 : public NON_EXPORTED_BASE(NavigationEntry) { |
40 public: | 40 public: |
41 // Represents a tree of FrameNavigationEntries that make up this joint session | 41 // Represents a tree of FrameNavigationEntries that make up this joint session |
42 // history item. The tree currently only tracks the main frame by default, | 42 // history item. The tree currently only tracks the main frame by default, |
43 // and is populated with subframe nodes in --site-per-process mode. | 43 // and is populated with subframe nodes in --site-per-process mode. |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 std::unique_ptr<NavigationEntryImpl> CloneAndReplace( | 171 std::unique_ptr<NavigationEntryImpl> CloneAndReplace( |
172 FrameNavigationEntry* frame_entry, | 172 FrameNavigationEntry* frame_entry, |
173 bool clone_children_of_target, | 173 bool clone_children_of_target, |
174 FrameTreeNode* target_frame_tree_node, | 174 FrameTreeNode* target_frame_tree_node, |
175 FrameTreeNode* root_frame_tree_node) const; | 175 FrameTreeNode* root_frame_tree_node) const; |
176 | 176 |
177 // Helper functions to construct NavigationParameters for a navigation to this | 177 // Helper functions to construct NavigationParameters for a navigation to this |
178 // NavigationEntry. | 178 // NavigationEntry. |
179 CommonNavigationParams ConstructCommonNavigationParams( | 179 CommonNavigationParams ConstructCommonNavigationParams( |
180 const FrameNavigationEntry& frame_entry, | 180 const FrameNavigationEntry& frame_entry, |
181 const scoped_refptr<ResourceRequestBodyImpl>& post_body, | 181 const scoped_refptr<ResourceRequestBody>& post_body, |
182 const GURL& dest_url, | 182 const GURL& dest_url, |
183 const Referrer& dest_referrer, | 183 const Referrer& dest_referrer, |
184 FrameMsg_Navigate_Type::Value navigation_type, | 184 FrameMsg_Navigate_Type::Value navigation_type, |
185 PreviewsState previews_state, | 185 PreviewsState previews_state, |
186 const base::TimeTicks& navigation_start) const; | 186 const base::TimeTicks& navigation_start) const; |
187 StartNavigationParams ConstructStartNavigationParams() const; | 187 StartNavigationParams ConstructStartNavigationParams() const; |
188 RequestNavigationParams ConstructRequestNavigationParams( | 188 RequestNavigationParams ConstructRequestNavigationParams( |
189 const FrameNavigationEntry& frame_entry, | 189 const FrameNavigationEntry& frame_entry, |
190 const GURL& original_url, | 190 const GURL& original_url, |
191 const std::string& original_method, | 191 const std::string& original_method, |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 RestoreType restore_type_; | 449 RestoreType restore_type_; |
450 GURL original_request_url_; | 450 GURL original_request_url_; |
451 bool is_overriding_user_agent_; | 451 bool is_overriding_user_agent_; |
452 base::Time timestamp_; | 452 base::Time timestamp_; |
453 int http_status_code_; | 453 int http_status_code_; |
454 | 454 |
455 // This member is not persisted with session restore because it is transient. | 455 // This member is not persisted with session restore because it is transient. |
456 // If the post request succeeds, this field is cleared since the same | 456 // If the post request succeeds, this field is cleared since the same |
457 // information is stored in PageState. It is also only shallow copied with | 457 // information is stored in PageState. It is also only shallow copied with |
458 // compiler provided copy constructor. Cleared in |ResetForCommit|. | 458 // compiler provided copy constructor. Cleared in |ResetForCommit|. |
459 scoped_refptr<ResourceRequestBodyImpl> post_data_; | 459 scoped_refptr<ResourceRequestBody> post_data_; |
460 | 460 |
461 // This is also a transient member (i.e. is not persisted with session | 461 // This is also a transient member (i.e. is not persisted with session |
462 // restore). The screenshot of a page is taken when navigating away from the | 462 // restore). The screenshot of a page is taken when navigating away from the |
463 // page. This screenshot is displayed during an overscroll-navigation | 463 // page. This screenshot is displayed during an overscroll-navigation |
464 // gesture. |screenshot_| will be NULL when the screenshot is not available | 464 // gesture. |screenshot_| will be NULL when the screenshot is not available |
465 // (e.g. after a session restore, or if taking the screenshot of a page | 465 // (e.g. after a session restore, or if taking the screenshot of a page |
466 // failed). The UI is responsible for dealing with missing screenshots | 466 // failed). The UI is responsible for dealing with missing screenshots |
467 // appropriately (e.g. display a placeholder image instead). | 467 // appropriately (e.g. display a placeholder image instead). |
468 scoped_refptr<base::RefCountedBytes> screenshot_; | 468 scoped_refptr<base::RefCountedBytes> screenshot_; |
469 | 469 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 // Set to true if the navigation controller gets notified about a SSL error | 554 // Set to true if the navigation controller gets notified about a SSL error |
555 // for a pending navigation. Defaults to false. | 555 // for a pending navigation. Defaults to false. |
556 bool ssl_error_; | 556 bool ssl_error_; |
557 | 557 |
558 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); | 558 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); |
559 }; | 559 }; |
560 | 560 |
561 } // namespace content | 561 } // namespace content |
562 | 562 |
563 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 563 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
OLD | NEW |