| Index: content/common/page_state_serialization.h
|
| diff --git a/content/common/page_state_serialization.h b/content/common/page_state_serialization.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4fcb10d708a987da73c9dc906bebaea4ebc1896d
|
| --- /dev/null
|
| +++ b/content/common/page_state_serialization.h
|
| @@ -0,0 +1,80 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_
|
| +#define CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_
|
| +
|
| +#include "base/files/file_path.h"
|
| +#include "base/nullable_string16.h"
|
| +#include "content/common/content_export.h"
|
| +#include "googleurl/src/gurl.h"
|
| +#include "third_party/WebKit/public/platform/WebHTTPBody.h"
|
| +#include "ui/gfx/point.h"
|
| +
|
| +namespace content {
|
| +
|
| +struct CONTENT_EXPORT ExplodedHttpBodyElement {
|
| + WebKit::WebHTTPBody::Element::Type type;
|
| + std::string data;
|
| + base::FilePath file_path;
|
| + GURL url;
|
| + int64 file_start;
|
| + int64 file_length;
|
| + double file_modification_time;
|
| +
|
| + ExplodedHttpBodyElement();
|
| + ~ExplodedHttpBodyElement();
|
| +};
|
| +
|
| +struct CONTENT_EXPORT ExplodedHttpBody {
|
| + NullableString16 http_content_type;
|
| + std::vector<ExplodedHttpBodyElement> elements;
|
| + int64 identifier;
|
| + bool contains_passwords;
|
| + bool is_null;
|
| +
|
| + ExplodedHttpBody();
|
| + ~ExplodedHttpBody();
|
| +};
|
| +
|
| +struct CONTENT_EXPORT ExplodedFrameState {
|
| + NullableString16 url_string;
|
| + NullableString16 original_url_string;
|
| + NullableString16 referrer;
|
| + NullableString16 target;
|
| + NullableString16 parent;
|
| + NullableString16 title;
|
| + NullableString16 alternate_title;
|
| + NullableString16 state_object;
|
| + std::vector<NullableString16> document_state;
|
| + gfx::Point scroll_offset;
|
| + int64 item_sequence_number;
|
| + int64 document_sequence_number;
|
| + int visit_count;
|
| + double visited_time;
|
| + double page_scale_factor;
|
| + bool is_target_item;
|
| + ExplodedHttpBody http_body;
|
| + std::vector<ExplodedFrameState> children;
|
| +
|
| + ExplodedFrameState();
|
| + ~ExplodedFrameState();
|
| +};
|
| +
|
| +struct CONTENT_EXPORT ExplodedPageState {
|
| + std::vector<base::FilePath> referenced_files;
|
| + ExplodedFrameState top;
|
| +
|
| + ExplodedPageState();
|
| + ~ExplodedPageState();
|
| +};
|
| +
|
| +CONTENT_EXPORT bool DecodePageState(const std::string& encoded,
|
| + ExplodedPageState* exploded);
|
| +CONTENT_EXPORT bool EncodePageState(const ExplodedPageState& exploded,
|
| + std::string* encoded);
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_
|
|
|