| 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 bool has_potentially_trustworthy_unique_origin); |
| 28 FrameReplicationState(const FrameReplicationState& other); |
| 28 ~FrameReplicationState(); | 29 ~FrameReplicationState(); |
| 29 | 30 |
| 30 // Current origin of the frame. This field is updated whenever a frame | 31 // Current origin of the frame. This field is updated whenever a frame |
| 31 // navigation commits. | 32 // navigation commits. |
| 32 // | 33 // |
| 33 // TODO(alexmos): For now, |origin| updates are immediately sent to all frame | 34 // TODO(alexmos): For now, |origin| updates are immediately sent to all frame |
| 34 // proxies when in --site-per-process mode. This isn't ideal, since Blink | 35 // proxies when in --site-per-process mode. This isn't ideal, since Blink |
| 35 // typically needs a proxy's origin only when performing security checks on | 36 // typically needs a proxy's origin only when performing security checks on |
| 36 // the ancestors of a local frame. So, as a future improvement, we could | 37 // the ancestors of a local frame. So, as a future improvement, we could |
| 37 // delay sending origin updates to proxies until they have a local descendant | 38 // delay sending origin updates to proxies until they have a local descendant |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // trustworthy. | 96 // trustworthy. |
| 96 bool has_potentially_trustworthy_unique_origin; | 97 bool has_potentially_trustworthy_unique_origin; |
| 97 | 98 |
| 98 // TODO(alexmos): Eventually, this structure can also hold other state that | 99 // TODO(alexmos): Eventually, this structure can also hold other state that |
| 99 // needs to be replicated, such as frame sizing info. | 100 // needs to be replicated, such as frame sizing info. |
| 100 }; | 101 }; |
| 101 | 102 |
| 102 } // namespace content | 103 } // namespace content |
| 103 | 104 |
| 104 #endif // CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ | 105 #endif // CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ |
| OLD | NEW |