| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 ExplodedFrameState(); | 61 ExplodedFrameState(); |
| 62 ExplodedFrameState(const ExplodedFrameState& other); | 62 ExplodedFrameState(const ExplodedFrameState& other); |
| 63 ~ExplodedFrameState(); | 63 ~ExplodedFrameState(); |
| 64 void operator=(const ExplodedFrameState& other); | 64 void operator=(const ExplodedFrameState& other); |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 void assign(const ExplodedFrameState& other); | 67 void assign(const ExplodedFrameState& other); |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 struct CONTENT_EXPORT ExplodedPageState { | 70 struct CONTENT_EXPORT ExplodedPageState { |
| 71 // TODO(creis): Move referenced_files to ExplodedFrameState. |
| 72 // It currently contains a list from all frames, but cannot be deserialized |
| 73 // into the files referenced by each frame. See http://crbug.com/441966. |
| 71 std::vector<base::NullableString16> referenced_files; | 74 std::vector<base::NullableString16> referenced_files; |
| 72 ExplodedFrameState top; | 75 ExplodedFrameState top; |
| 73 | 76 |
| 74 ExplodedPageState(); | 77 ExplodedPageState(); |
| 75 ~ExplodedPageState(); | 78 ~ExplodedPageState(); |
| 76 }; | 79 }; |
| 77 | 80 |
| 78 CONTENT_EXPORT bool DecodePageState(const std::string& encoded, | 81 CONTENT_EXPORT bool DecodePageState(const std::string& encoded, |
| 79 ExplodedPageState* exploded); | 82 ExplodedPageState* exploded); |
| 80 CONTENT_EXPORT bool EncodePageState(const ExplodedPageState& exploded, | 83 CONTENT_EXPORT bool EncodePageState(const ExplodedPageState& exploded, |
| 81 std::string* encoded); | 84 std::string* encoded); |
| 82 | 85 |
| 83 #if defined(OS_ANDROID) | 86 #if defined(OS_ANDROID) |
| 84 CONTENT_EXPORT bool DecodePageStateWithDeviceScaleFactorForTesting( | 87 CONTENT_EXPORT bool DecodePageStateWithDeviceScaleFactorForTesting( |
| 85 const std::string& encoded, | 88 const std::string& encoded, |
| 86 float device_scale_factor, | 89 float device_scale_factor, |
| 87 ExplodedPageState* exploded); | 90 ExplodedPageState* exploded); |
| 88 #endif | 91 #endif |
| 89 | 92 |
| 90 } // namespace content | 93 } // namespace content |
| 91 | 94 |
| 92 #endif // CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_ | 95 #endif // CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_ |
| OLD | NEW |