| 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_COMMON_PAGE_STATE_SERIALIZATION_H_ | 5 #ifndef CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_ |
| 6 #define CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_ | 6 #define CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/strings/nullable_string16.h" | 10 #include "base/strings/nullable_string16.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 gfx::PointF pinch_viewport_scroll_offset; | 51 gfx::PointF pinch_viewport_scroll_offset; |
| 52 gfx::Point scroll_offset; | 52 gfx::Point scroll_offset; |
| 53 int64 item_sequence_number; | 53 int64 item_sequence_number; |
| 54 int64 document_sequence_number; | 54 int64 document_sequence_number; |
| 55 double page_scale_factor; | 55 double page_scale_factor; |
| 56 blink::WebReferrerPolicy referrer_policy; | 56 blink::WebReferrerPolicy referrer_policy; |
| 57 ExplodedHttpBody http_body; | 57 ExplodedHttpBody http_body; |
| 58 std::vector<ExplodedFrameState> children; | 58 std::vector<ExplodedFrameState> children; |
| 59 | 59 |
| 60 ExplodedFrameState(); | 60 ExplodedFrameState(); |
| 61 ExplodedFrameState(const ExplodedFrameState& other); |
| 61 ~ExplodedFrameState(); | 62 ~ExplodedFrameState(); |
| 63 void operator=(const ExplodedFrameState& other); |
| 64 |
| 65 private: |
| 66 void assign(const ExplodedFrameState& other); |
| 62 }; | 67 }; |
| 63 | 68 |
| 64 struct CONTENT_EXPORT ExplodedPageState { | 69 struct CONTENT_EXPORT ExplodedPageState { |
| 65 std::vector<base::NullableString16> referenced_files; | 70 std::vector<base::NullableString16> referenced_files; |
| 66 ExplodedFrameState top; | 71 ExplodedFrameState top; |
| 67 | 72 |
| 68 ExplodedPageState(); | 73 ExplodedPageState(); |
| 69 ~ExplodedPageState(); | 74 ~ExplodedPageState(); |
| 70 }; | 75 }; |
| 71 | 76 |
| 72 CONTENT_EXPORT bool DecodePageState(const std::string& encoded, | 77 CONTENT_EXPORT bool DecodePageState(const std::string& encoded, |
| 73 ExplodedPageState* exploded); | 78 ExplodedPageState* exploded); |
| 74 CONTENT_EXPORT bool EncodePageState(const ExplodedPageState& exploded, | 79 CONTENT_EXPORT bool EncodePageState(const ExplodedPageState& exploded, |
| 75 std::string* encoded); | 80 std::string* encoded); |
| 76 | 81 |
| 77 #if defined(OS_ANDROID) | 82 #if defined(OS_ANDROID) |
| 78 CONTENT_EXPORT bool DecodePageStateWithDeviceScaleFactorForTesting( | 83 CONTENT_EXPORT bool DecodePageStateWithDeviceScaleFactorForTesting( |
| 79 const std::string& encoded, | 84 const std::string& encoded, |
| 80 float device_scale_factor, | 85 float device_scale_factor, |
| 81 ExplodedPageState* exploded); | 86 ExplodedPageState* exploded); |
| 82 #endif | 87 #endif |
| 83 | 88 |
| 84 } // namespace content | 89 } // namespace content |
| 85 | 90 |
| 86 #endif // CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_ | 91 #endif // CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_ |
| OLD | NEW |