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