// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ #define CONTENT_COMMON_FRAME_REPLICATION_STATE_H_ #include #include #include "content/common/content_export.h" #include "services/network/public/mojom/content_security_policy.mojom.h" #include "services/network/public/mojom/web_sandbox_flags.mojom.h" #include "third_party/blink/public/common/feature_policy/feature_policy.h" #include "third_party/blink/public/common/frame/frame_policy.h" #include "third_party/blink/public/mojom/ad_tagging/ad_frame.mojom.h" #include "third_party/blink/public/mojom/frame/frame_owner_element_type.mojom.h" #include "third_party/blink/public/mojom/frame/tree_scope_type.mojom.h" #include "third_party/blink/public/mojom/security_context/insecure_request_policy.mojom.h" #include "url/origin.h" namespace content { // This structure holds information that needs to be replicated between a // RenderFrame and any of its associated RenderFrameProxies. struct CONTENT_EXPORT FrameReplicationState { FrameReplicationState(); FrameReplicationState( blink::mojom::TreeScopeType scope, const std::string& name, const std::string& unique_name, blink::mojom::InsecureRequestPolicy insecure_request_policy, const std::vector& insecure_navigations_set, bool has_potentially_trustworthy_unique_origin, bool has_active_user_gesture, bool has_received_user_gesture_before_nav, blink::mojom::FrameOwnerElementType owner_type); ~FrameReplicationState(); FrameReplicationState(const FrameReplicationState& other); FrameReplicationState& operator=(const FrameReplicationState& other); // Current origin of the frame. This field is updated whenever a frame // navigation commits. // // TODO(alexmos): For now, |origin| updates are immediately sent to all frame // proxies when in --site-per-process mode. This isn't ideal, since Blink // typically needs a proxy's origin only when performing security checks on // the ancestors of a local frame. So, as a future improvement, we could // delay sending origin updates to proxies until they have a local descendant // (if ever). This would reduce leaking a user's browsing history into a // compromized renderer. url::Origin origin; // The assigned name of the frame (see WebFrame::assignedName()). // // |name| is set when a new child frame is created using the value of the //