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.h" | 13 #include "content/common/resource_request_body_impl.h" |
14 #include "content/public/common/page_state.h" | 14 #include "content/public/common/page_state.h" |
15 #include "content/public/common/referrer.h" | 15 #include "content/public/common/referrer.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 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 const std::string& method() const { return method_; } | 117 const std::string& method() const { return method_; } |
118 void set_method(const std::string& method) { method_ = method; } | 118 void set_method(const std::string& method) { method_ = method; } |
119 | 119 |
120 // The id of the post corresponding to this navigation or -1 if the | 120 // The id of the post corresponding to this navigation or -1 if the |
121 // navigation was not a POST. | 121 // navigation was not a POST. |
122 int64_t post_id() const { return post_id_; } | 122 int64_t post_id() const { return post_id_; } |
123 void set_post_id(int64_t post_id) { post_id_ = post_id; } | 123 void set_post_id(int64_t post_id) { post_id_ = post_id; } |
124 | 124 |
125 // The data sent during a POST navigation. Returns nullptr if the navigation | 125 // The data sent during a POST navigation. Returns nullptr if the navigation |
126 // is not a POST. | 126 // is not a POST. |
127 scoped_refptr<ResourceRequestBody> GetPostData() const; | 127 scoped_refptr<ResourceRequestBodyImpl> GetPostData() const; |
128 | 128 |
129 private: | 129 private: |
130 friend class base::RefCounted<FrameNavigationEntry>; | 130 friend class base::RefCounted<FrameNavigationEntry>; |
131 virtual ~FrameNavigationEntry(); | 131 virtual ~FrameNavigationEntry(); |
132 | 132 |
133 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 133 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
134 // Add all new fields to |UpdateEntry|. | 134 // Add all new fields to |UpdateEntry|. |
135 // TODO(creis): These fields have implications for session restore. This is | 135 // TODO(creis): These fields have implications for session restore. This is |
136 // currently managed by NavigationEntry, but the logic will move here. | 136 // currently managed by NavigationEntry, but the logic will move here. |
137 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 137 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
(...skipping 11 matching lines...) Expand all Loading... |
149 PageState page_state_; | 149 PageState page_state_; |
150 std::string method_; | 150 std::string method_; |
151 int64_t post_id_; | 151 int64_t post_id_; |
152 | 152 |
153 DISALLOW_COPY_AND_ASSIGN(FrameNavigationEntry); | 153 DISALLOW_COPY_AND_ASSIGN(FrameNavigationEntry); |
154 }; | 154 }; |
155 | 155 |
156 } // namespace content | 156 } // namespace content |
157 | 157 |
158 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_H_ | 158 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_H_ |
OLD | NEW |