| 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 #include "content/common/page_state_serialization.h" | 5 #include "content/common/page_state_serialization.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 WriteString(state.target, obj); | 507 WriteString(state.target, obj); |
| 508 WriteInteger(state.scroll_offset.x(), obj); | 508 WriteInteger(state.scroll_offset.x(), obj); |
| 509 WriteInteger(state.scroll_offset.y(), obj); | 509 WriteInteger(state.scroll_offset.y(), obj); |
| 510 WriteString(state.referrer, obj); | 510 WriteString(state.referrer, obj); |
| 511 | 511 |
| 512 WriteStringVector(state.document_state, obj); | 512 WriteStringVector(state.document_state, obj); |
| 513 | 513 |
| 514 WriteReal(state.page_scale_factor, obj); | 514 WriteReal(state.page_scale_factor, obj); |
| 515 WriteInteger64(state.item_sequence_number, obj); | 515 WriteInteger64(state.item_sequence_number, obj); |
| 516 WriteInteger64(state.document_sequence_number, obj); | 516 WriteInteger64(state.document_sequence_number, obj); |
| 517 WriteInteger(state.referrer_policy, obj); | 517 WriteInteger(static_cast<int>(state.referrer_policy), obj); |
| 518 WriteReal(state.visual_viewport_scroll_offset.x(), obj); | 518 WriteReal(state.visual_viewport_scroll_offset.x(), obj); |
| 519 WriteReal(state.visual_viewport_scroll_offset.y(), obj); | 519 WriteReal(state.visual_viewport_scroll_offset.y(), obj); |
| 520 | 520 |
| 521 WriteInteger(state.scroll_restoration_type, obj); | 521 WriteInteger(state.scroll_restoration_type, obj); |
| 522 | 522 |
| 523 bool has_state_object = !state.state_object.is_null(); | 523 bool has_state_object = !state.state_object.is_null(); |
| 524 WriteBoolean(has_state_object, obj); | 524 WriteBoolean(has_state_object, obj); |
| 525 if (has_state_object) | 525 if (has_state_object) |
| 526 WriteString(state.state_object, obj); | 526 WriteString(state.state_object, obj); |
| 527 | 527 |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 const ResourceRequestBodyImpl& resource_request_body) { | 772 const ResourceRequestBodyImpl& resource_request_body) { |
| 773 SerializeObject obj; | 773 SerializeObject obj; |
| 774 obj.version = kCurrentVersion; | 774 obj.version = kCurrentVersion; |
| 775 WriteResourceRequestBody(resource_request_body, &obj); | 775 WriteResourceRequestBody(resource_request_body, &obj); |
| 776 return obj.GetAsString(); | 776 return obj.GetAsString(); |
| 777 } | 777 } |
| 778 | 778 |
| 779 #endif | 779 #endif |
| 780 | 780 |
| 781 } // namespace content | 781 } // namespace content |
| OLD | NEW |