OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "content/renderer/history_serialization.h" | 5 #include "content/renderer/history_serialization.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/strings/nullable_string16.h" | 9 #include "base/strings/nullable_string16.h" |
10 #include "content/child/web_url_request_util.h" | 10 #include "content/child/web_url_request_util.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 state->target = item.target(); | 45 state->target = item.target(); |
46 if (!item.stateObject().isNull()) | 46 if (!item.stateObject().isNull()) |
47 state->state_object = item.stateObject().toString(); | 47 state->state_object = item.stateObject().toString(); |
48 state->scroll_restoration_type = item.scrollRestorationType(); | 48 state->scroll_restoration_type = item.scrollRestorationType(); |
49 state->visual_viewport_scroll_offset = item.visualViewportScrollOffset(); | 49 state->visual_viewport_scroll_offset = item.visualViewportScrollOffset(); |
50 state->scroll_offset = item.getScrollOffset(); | 50 state->scroll_offset = item.getScrollOffset(); |
51 state->item_sequence_number = item.itemSequenceNumber(); | 51 state->item_sequence_number = item.itemSequenceNumber(); |
52 state->document_sequence_number = | 52 state->document_sequence_number = |
53 item.documentSequenceNumber(); | 53 item.documentSequenceNumber(); |
54 state->page_scale_factor = item.pageScaleFactor(); | 54 state->page_scale_factor = item.pageScaleFactor(); |
55 ToNullableString16Vector(item.documentState(), &state->document_state); | 55 ToNullableString16Vector(item.getDocumentState(), &state->document_state); |
56 | 56 |
57 state->http_body.http_content_type = item.httpContentType(); | 57 state->http_body.http_content_type = item.httpContentType(); |
58 const WebHTTPBody& http_body = item.httpBody(); | 58 const WebHTTPBody& http_body = item.httpBody(); |
59 if (!http_body.isNull()) { | 59 if (!http_body.isNull()) { |
60 state->http_body.request_body = GetRequestBodyForWebHTTPBody(http_body); | 60 state->http_body.request_body = GetRequestBodyForWebHTTPBody(http_body); |
61 state->http_body.contains_passwords = http_body.containsPasswordData(); | 61 state->http_body.contains_passwords = http_body.containsPasswordData(); |
62 } | 62 } |
63 } | 63 } |
64 | 64 |
65 void RecursivelyGenerateFrameState( | 65 void RecursivelyGenerateFrameState( |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 if (!DecodePageState(page_state.ToEncodedData(), &state)) | 143 if (!DecodePageState(page_state.ToEncodedData(), &state)) |
144 return std::unique_ptr<HistoryEntry>(); | 144 return std::unique_ptr<HistoryEntry>(); |
145 | 145 |
146 std::unique_ptr<HistoryEntry> entry(new HistoryEntry()); | 146 std::unique_ptr<HistoryEntry> entry(new HistoryEntry()); |
147 RecursivelyGenerateHistoryItem(state.top, entry->root_history_node()); | 147 RecursivelyGenerateHistoryItem(state.top, entry->root_history_node()); |
148 | 148 |
149 return entry; | 149 return entry; |
150 } | 150 } |
151 | 151 |
152 } // namespace content | 152 } // namespace content |
OLD | NEW |