OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_FRAME_NAVIGATION_ENTRY_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "content/browser/site_instance_impl.h" | 12 #include "content/browser/site_instance_impl.h" |
13 #include "content/common/resource_request_body_impl.h" | |
14 #include "content/public/common/page_state.h" | 13 #include "content/public/common/page_state.h" |
15 #include "content/public/common/referrer.h" | 14 #include "content/public/common/referrer.h" |
| 15 #include "content/public/common/resource_request_body.h" |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 | 18 |
19 // Represents a session history item for a particular frame. It is matched with | 19 // Represents a session history item for a particular frame. It is matched with |
20 // corresponding FrameTreeNodes using unique name (or by the root position). | 20 // corresponding FrameTreeNodes using unique name (or by the root position). |
21 // | 21 // |
22 // This class is refcounted and can be shared across multiple NavigationEntries. | 22 // This class is refcounted and can be shared across multiple NavigationEntries. |
23 // For now, it is owned by a single NavigationEntry and only tracks the main | 23 // For now, it is owned by a single NavigationEntry and only tracks the main |
24 // frame. | 24 // frame. |
25 // | 25 // |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 const std::string& method() const { return method_; } | 125 const std::string& method() const { return method_; } |
126 void set_method(const std::string& method) { method_ = method; } | 126 void set_method(const std::string& method) { method_ = method; } |
127 | 127 |
128 // The id of the post corresponding to this navigation or -1 if the | 128 // The id of the post corresponding to this navigation or -1 if the |
129 // navigation was not a POST. | 129 // navigation was not a POST. |
130 int64_t post_id() const { return post_id_; } | 130 int64_t post_id() const { return post_id_; } |
131 void set_post_id(int64_t post_id) { post_id_ = post_id; } | 131 void set_post_id(int64_t post_id) { post_id_ = post_id; } |
132 | 132 |
133 // The data sent during a POST navigation. Returns nullptr if the navigation | 133 // The data sent during a POST navigation. Returns nullptr if the navigation |
134 // is not a POST. | 134 // is not a POST. |
135 scoped_refptr<ResourceRequestBodyImpl> GetPostData() const; | 135 scoped_refptr<ResourceRequestBody> GetPostData() const; |
136 | 136 |
137 private: | 137 private: |
138 friend class base::RefCounted<FrameNavigationEntry>; | 138 friend class base::RefCounted<FrameNavigationEntry>; |
139 virtual ~FrameNavigationEntry(); | 139 virtual ~FrameNavigationEntry(); |
140 | 140 |
141 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 141 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
142 // Add all new fields to |UpdateEntry|. | 142 // Add all new fields to |UpdateEntry|. |
143 // TODO(creis): These fields have implications for session restore. This is | 143 // TODO(creis): These fields have implications for session restore. This is |
144 // currently managed by NavigationEntry, but the logic will move here. | 144 // currently managed by NavigationEntry, but the logic will move here. |
145 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 145 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
(...skipping 16 matching lines...) Expand all Loading... |
162 PageState page_state_; | 162 PageState page_state_; |
163 std::string method_; | 163 std::string method_; |
164 int64_t post_id_; | 164 int64_t post_id_; |
165 | 165 |
166 DISALLOW_COPY_AND_ASSIGN(FrameNavigationEntry); | 166 DISALLOW_COPY_AND_ASSIGN(FrameNavigationEntry); |
167 }; | 167 }; |
168 | 168 |
169 } // namespace content | 169 } // namespace content |
170 | 170 |
171 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_H_ | 171 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_H_ |
OLD | NEW |