Vectorize website settings icons in omnibox
[chromium-blink-merge.git] / components / html_viewer / replicated_frame_state.h
blobeedc59cc8a678b2de91dbdaad89525f1f11cba48
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.
5 #ifndef COMPONENTS_HTML_VIEWER_REPLICATED_FRAME_STATE_H_
6 #define COMPONENTS_HTML_VIEWER_REPLICATED_FRAME_STATE_H_
8 #include "third_party/WebKit/public/platform/WebString.h"
9 #include "third_party/WebKit/public/web/WebSandboxFlags.h"
10 #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"
16 namespace html_viewer {
18 // Stores state shared with other frames in the tree.
19 struct ReplicatedFrameState {
20 public:
21 ReplicatedFrameState();
22 ~ReplicatedFrameState();
24 blink::WebString name;
25 url::Origin origin;
26 blink::WebSandboxFlags sandbox_flags;
27 blink::WebTreeScopeType tree_scope;
30 // Sets |state| from |properties|.
31 void SetReplicatedFrameStateFromClientProperties(
32 const mojo::Map<mojo::String, mojo::Array<uint8_t>>& properties,
33 ReplicatedFrameState* state);
35 // Sets |properties| from |state|.
36 void ClientPropertiesFromReplicatedFrameState(
37 const ReplicatedFrameState& state,
38 mojo::Map<mojo::String, mojo::Array<uint8_t>>* properties);
40 } // namespace html_viewer
42 #endif // COMPONENTS_HTML_VIEWER_REPLICATED_FRAME_STATE_H_