Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Side by Side Diff: content/common/page_state_serialization.h

Issue 16335022: Re-implement PageState serialization without a Blink API dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/android/pylib/gtest/test_runner.py ('k') | content/common/page_state_serialization.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_
6 #define CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_
7
8 #include "base/files/file_path.h"
9 #include "base/nullable_string16.h"
10 #include "content/common/content_export.h"
11 #include "googleurl/src/gurl.h"
12 #include "third_party/WebKit/public/platform/WebHTTPBody.h"
13 #include "ui/gfx/point.h"
14
15 namespace content {
16
17 struct CONTENT_EXPORT ExplodedHttpBodyElement {
18 WebKit::WebHTTPBody::Element::Type type;
19 std::string data;
20 base::FilePath file_path;
21 GURL url;
22 int64 file_start;
23 int64 file_length;
24 double file_modification_time;
25
26 ExplodedHttpBodyElement();
27 ~ExplodedHttpBodyElement();
28 };
29
30 struct CONTENT_EXPORT ExplodedHttpBody {
31 NullableString16 http_content_type;
32 std::vector<ExplodedHttpBodyElement> elements;
33 int64 identifier;
34 bool contains_passwords;
35 bool is_null;
36
37 ExplodedHttpBody();
38 ~ExplodedHttpBody();
39 };
40
41 struct CONTENT_EXPORT ExplodedFrameState {
42 NullableString16 url_string;
43 NullableString16 original_url_string;
44 NullableString16 referrer;
45 NullableString16 target;
46 NullableString16 parent;
47 NullableString16 title;
48 NullableString16 alternate_title;
49 NullableString16 state_object;
50 std::vector<NullableString16> document_state;
51 gfx::Point scroll_offset;
52 int64 item_sequence_number;
53 int64 document_sequence_number;
54 int visit_count;
55 double visited_time;
56 double page_scale_factor;
57 bool is_target_item;
58 ExplodedHttpBody http_body;
59 std::vector<ExplodedFrameState> children;
60
61 ExplodedFrameState();
62 ~ExplodedFrameState();
63 };
64
65 struct CONTENT_EXPORT ExplodedPageState {
66 std::vector<base::FilePath> referenced_files;
67 ExplodedFrameState top;
68
69 ExplodedPageState();
70 ~ExplodedPageState();
71 };
72
73 CONTENT_EXPORT bool DecodePageState(const std::string& encoded,
74 ExplodedPageState* exploded);
75 CONTENT_EXPORT bool EncodePageState(const ExplodedPageState& exploded,
76 std::string* encoded);
77
78 } // namespace content
79
80 #endif // CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_
OLDNEW
« no previous file with comments | « build/android/pylib/gtest/test_runner.py ('k') | content/common/page_state_serialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698