OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ | 5 #ifndef CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ |
6 #define CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ | 6 #define CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ |
7 | 7 |
8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
9 #include "url/origin.h" | 9 #include "url/origin.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 enum class WebTreeScopeType; | 12 enum class WebTreeScopeType; |
13 enum class WebSandboxFlags; | 13 enum class WebSandboxFlags; |
14 } | 14 } |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 // This structure holds information that needs to be replicated between a | 18 // This structure holds information that needs to be replicated between a |
19 // RenderFrame and any of its associated RenderFrameProxies. | 19 // RenderFrame and any of its associated RenderFrameProxies. |
20 struct CONTENT_EXPORT FrameReplicationState { | 20 struct CONTENT_EXPORT FrameReplicationState { |
21 FrameReplicationState(); | 21 FrameReplicationState(); |
22 FrameReplicationState(blink::WebTreeScopeType scope, | 22 FrameReplicationState(blink::WebTreeScopeType scope, |
23 const std::string& name, | 23 const std::string& name, |
24 blink::WebSandboxFlags sandbox_flags); | 24 blink::WebSandboxFlags sandbox_flags, |
| 25 bool should_enforce_strict_mixed_content_checking); |
25 ~FrameReplicationState(); | 26 ~FrameReplicationState(); |
26 | 27 |
27 // Current origin of the frame. This field is updated whenever a frame | 28 // Current origin of the frame. This field is updated whenever a frame |
28 // navigation commits. | 29 // navigation commits. |
29 // | 30 // |
30 // TODO(alexmos): For now, |origin| updates are immediately sent to all frame | 31 // TODO(alexmos): For now, |origin| updates are immediately sent to all frame |
31 // proxies when in --site-per-process mode. This isn't ideal, since Blink | 32 // proxies when in --site-per-process mode. This isn't ideal, since Blink |
32 // typically needs a proxy's origin only when performing security checks on | 33 // typically needs a proxy's origin only when performing security checks on |
33 // the ancestors of a local frame. So, as a future improvement, we could | 34 // the ancestors of a local frame. So, as a future improvement, we could |
34 // delay sending origin updates to proxies until they have a local descendant | 35 // delay sending origin updates to proxies until they have a local descendant |
(...skipping 27 matching lines...) Expand all Loading... |
62 std::string name; | 63 std::string name; |
63 | 64 |
64 // Whether the frame is in a document tree or a shadow tree, per the Shadow | 65 // Whether the frame is in a document tree or a shadow tree, per the Shadow |
65 // DOM spec: https://w3c.github.io/webcomponents/spec/shadow/ | 66 // DOM spec: https://w3c.github.io/webcomponents/spec/shadow/ |
66 // Note: This should really be const, as it can never change once a frame is | 67 // Note: This should really be const, as it can never change once a frame is |
67 // created. However, making it const makes it a pain to embed into IPC message | 68 // created. However, making it const makes it a pain to embed into IPC message |
68 // params: having a const member implicitly deletes the copy assignment | 69 // params: having a const member implicitly deletes the copy assignment |
69 // operator. | 70 // operator. |
70 blink::WebTreeScopeType scope; | 71 blink::WebTreeScopeType scope; |
71 | 72 |
| 73 // True if a frame's current document should strictly block all mixed |
| 74 // content. Updates are immediately sent to all frame proxies when |
| 75 // frames live in different processes. |
| 76 bool should_enforce_strict_mixed_content_checking; |
| 77 |
72 // TODO(alexmos): Eventually, this structure can also hold other state that | 78 // TODO(alexmos): Eventually, this structure can also hold other state that |
73 // needs to be replicated, such as frame sizing info. | 79 // needs to be replicated, such as frame sizing info. |
74 }; | 80 }; |
75 | 81 |
76 } // namespace content | 82 } // namespace content |
77 | 83 |
78 #endif // CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ | 84 #endif // CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ |
OLD | NEW |