OLD | NEW |
| (Empty) |
1 // Copyright 2015 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 COMPONENTS_HTML_VIEWER_REPLICATED_FRAME_STATE_H_ | |
6 #define COMPONENTS_HTML_VIEWER_REPLICATED_FRAME_STATE_H_ | |
7 | |
8 #include <stdint.h> | |
9 | |
10 #include "mojo/public/cpp/bindings/array.h" | |
11 #include "mojo/public/cpp/bindings/map.h" | |
12 #include "mojo/public/cpp/bindings/string.h" | |
13 #include "third_party/WebKit/public/platform/WebString.h" | |
14 #include "third_party/WebKit/public/web/WebSandboxFlags.h" | |
15 #include "third_party/WebKit/public/web/WebTreeScopeType.h" | |
16 #include "url/origin.h" | |
17 | |
18 namespace html_viewer { | |
19 | |
20 // Stores state shared with other frames in the tree. | |
21 struct ReplicatedFrameState { | |
22 public: | |
23 ReplicatedFrameState(); | |
24 ~ReplicatedFrameState(); | |
25 | |
26 blink::WebString name; | |
27 url::Origin origin; | |
28 blink::WebSandboxFlags sandbox_flags; | |
29 blink::WebTreeScopeType tree_scope; | |
30 }; | |
31 | |
32 // Sets |state| from |properties|. | |
33 void SetReplicatedFrameStateFromClientProperties( | |
34 const mojo::Map<mojo::String, mojo::Array<uint8_t>>& properties, | |
35 ReplicatedFrameState* state); | |
36 | |
37 // Sets |properties| from |state|. | |
38 void ClientPropertiesFromReplicatedFrameState( | |
39 const ReplicatedFrameState& state, | |
40 mojo::Map<mojo::String, mojo::Array<uint8_t>>* properties); | |
41 | |
42 } // namespace html_viewer | |
43 | |
44 #endif // COMPONENTS_HTML_VIEWER_REPLICATED_FRAME_STATE_H_ | |
OLD | NEW |