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 const std::string& unique_name, | 24 const std::string& unique_name, |
25 blink::WebSandboxFlags sandbox_flags, | 25 blink::WebSandboxFlags sandbox_flags, |
26 bool should_enforce_strict_mixed_content_checking); | 26 bool should_enforce_strict_mixed_content_checking, |
| 27 bool has_potentially_trustworthy_unique_origin); |
27 ~FrameReplicationState(); | 28 ~FrameReplicationState(); |
28 | 29 |
29 // Current origin of the frame. This field is updated whenever a frame | 30 // Current origin of the frame. This field is updated whenever a frame |
30 // navigation commits. | 31 // navigation commits. |
31 // | 32 // |
32 // TODO(alexmos): For now, |origin| updates are immediately sent to all frame | 33 // TODO(alexmos): For now, |origin| updates are immediately sent to all frame |
33 // proxies when in --site-per-process mode. This isn't ideal, since Blink | 34 // proxies when in --site-per-process mode. This isn't ideal, since Blink |
34 // typically needs a proxy's origin only when performing security checks on | 35 // typically needs a proxy's origin only when performing security checks on |
35 // the ancestors of a local frame. So, as a future improvement, we could | 36 // the ancestors of a local frame. So, as a future improvement, we could |
36 // delay sending origin updates to proxies until they have a local descendant | 37 // delay sending origin updates to proxies until they have a local descendant |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // created. However, making it const makes it a pain to embed into IPC message | 84 // created. However, making it const makes it a pain to embed into IPC message |
84 // params: having a const member implicitly deletes the copy assignment | 85 // params: having a const member implicitly deletes the copy assignment |
85 // operator. | 86 // operator. |
86 blink::WebTreeScopeType scope; | 87 blink::WebTreeScopeType scope; |
87 | 88 |
88 // True if a frame's current document should strictly block all mixed | 89 // True if a frame's current document should strictly block all mixed |
89 // content. Updates are immediately sent to all frame proxies when | 90 // content. Updates are immediately sent to all frame proxies when |
90 // frames live in different processes. | 91 // frames live in different processes. |
91 bool should_enforce_strict_mixed_content_checking; | 92 bool should_enforce_strict_mixed_content_checking; |
92 | 93 |
| 94 // True if a frame's origin is unique and should be considered potentially |
| 95 // trustworthy. |
| 96 bool has_potentially_trustworthy_unique_origin; |
| 97 |
93 // TODO(alexmos): Eventually, this structure can also hold other state that | 98 // TODO(alexmos): Eventually, this structure can also hold other state that |
94 // needs to be replicated, such as frame sizing info. | 99 // needs to be replicated, such as frame sizing info. |
95 }; | 100 }; |
96 | 101 |
97 } // namespace content | 102 } // namespace content |
98 | 103 |
99 #endif // CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ | 104 #endif // CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ |
OLD | NEW |