| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "content/browser/frame_host/frame_tree_node_blame_context.h" | 16 #include "content/browser/frame_host/frame_tree_node_blame_context.h" |
| 17 #include "content/browser/frame_host/render_frame_host_impl.h" | 17 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 18 #include "content/browser/frame_host/render_frame_host_manager.h" | 18 #include "content/browser/frame_host/render_frame_host_manager.h" |
| 19 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
| 20 #include "content/common/feature_policy/feature_policy.h" |
| 20 #include "content/common/frame_owner_properties.h" | 21 #include "content/common/frame_owner_properties.h" |
| 21 #include "content/common/frame_replication_state.h" | 22 #include "content/common/frame_replication_state.h" |
| 22 #include "third_party/WebKit/public/platform/WebInsecureRequestPolicy.h" | 23 #include "third_party/WebKit/public/platform/WebInsecureRequestPolicy.h" |
| 23 #include "url/gurl.h" | 24 #include "url/gurl.h" |
| 24 #include "url/origin.h" | 25 #include "url/origin.h" |
| 25 | 26 |
| 26 namespace content { | 27 namespace content { |
| 27 | 28 |
| 28 class FrameTree; | 29 class FrameTree; |
| 29 class NavigationRequest; | 30 class NavigationRequest; |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 149 |
| 149 // Set the current origin and notify proxies about the update. | 150 // Set the current origin and notify proxies about the update. |
| 150 void SetCurrentOrigin(const url::Origin& origin, | 151 void SetCurrentOrigin(const url::Origin& origin, |
| 151 bool is_potentially_trustworthy_unique_origin); | 152 bool is_potentially_trustworthy_unique_origin); |
| 152 | 153 |
| 153 // Set the current name and notify proxies about the update. | 154 // Set the current name and notify proxies about the update. |
| 154 void SetFrameName(const std::string& name, const std::string& unique_name); | 155 void SetFrameName(const std::string& name, const std::string& unique_name); |
| 155 | 156 |
| 156 // Set the frame's feature policy from an HTTP header, clearing any existing | 157 // Set the frame's feature policy from an HTTP header, clearing any existing |
| 157 // policy. | 158 // policy. |
| 158 void SetFeaturePolicyHeader(const ParsedFeaturePolicy& parsed_header); | 159 void SetFeaturePolicyHeader(const FeaturePolicyHeader& parsed_header); |
| 159 | 160 |
| 160 // Clear any feature policy associated with the frame. | 161 // Clear any feature policy associated with the frame. |
| 161 void ResetFeaturePolicy(); | 162 void ResetFeaturePolicy(); |
| 162 | 163 |
| 163 // Add CSP header to replication state and notify proxies about the update. | 164 // Add CSP header to replication state and notify proxies about the update. |
| 164 void AddContentSecurityPolicy(const ContentSecurityPolicyHeader& header); | 165 void AddContentSecurityPolicy(const ContentSecurityPolicyHeader& header); |
| 165 | 166 |
| 166 // Discards previous CSP headers and notifies proxies about the update. | 167 // Discards previous CSP headers and notifies proxies about the update. |
| 167 // Typically invoked after committing navigation to a new document (since the | 168 // Typically invoked after committing navigation to a new document (since the |
| 168 // new document comes with a fresh set of CSP http headers). | 169 // new document comes with a fresh set of CSP http headers). |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 std::vector<std::unique_ptr<FrameTreeNode>> children_; | 344 std::vector<std::unique_ptr<FrameTreeNode>> children_; |
| 344 | 345 |
| 345 // Whether this frame has committed any real load, replacing its initial | 346 // Whether this frame has committed any real load, replacing its initial |
| 346 // about:blank page. | 347 // about:blank page. |
| 347 bool has_committed_real_load_; | 348 bool has_committed_real_load_; |
| 348 | 349 |
| 349 // Track information that needs to be replicated to processes that have | 350 // Track information that needs to be replicated to processes that have |
| 350 // proxies for this frame. | 351 // proxies for this frame. |
| 351 FrameReplicationState replication_state_; | 352 FrameReplicationState replication_state_; |
| 352 | 353 |
| 354 std::unique_ptr<FeaturePolicy> feature_policy_; |
| 355 |
| 353 // Track the pending sandbox flags for this frame. When a parent frame | 356 // Track the pending sandbox flags for this frame. When a parent frame |
| 354 // dynamically updates sandbox flags in the <iframe> element for a child | 357 // dynamically updates sandbox flags in the <iframe> element for a child |
| 355 // frame, these updated flags are stored here and are transferred into | 358 // frame, these updated flags are stored here and are transferred into |
| 356 // replication_state_.sandbox_flags when they take effect on the next frame | 359 // replication_state_.sandbox_flags when they take effect on the next frame |
| 357 // navigation. | 360 // navigation. |
| 358 blink::WebSandboxFlags pending_sandbox_flags_; | 361 blink::WebSandboxFlags pending_sandbox_flags_; |
| 359 | 362 |
| 360 // Tracks the scrolling and margin properties for this frame. These | 363 // Tracks the scrolling and margin properties for this frame. These |
| 361 // properties affect the child renderer but are stored on its parent's | 364 // properties affect the child renderer but are stored on its parent's |
| 362 // frame element. When this frame's parent dynamically updates these | 365 // frame element. When this frame's parent dynamically updates these |
| (...skipping 19 matching lines...) Expand all Loading... |
| 382 // browser process activities to this node (when possible). It is unrelated | 385 // browser process activities to this node (when possible). It is unrelated |
| 383 // to the core logic of FrameTreeNode. | 386 // to the core logic of FrameTreeNode. |
| 384 FrameTreeNodeBlameContext blame_context_; | 387 FrameTreeNodeBlameContext blame_context_; |
| 385 | 388 |
| 386 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); | 389 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); |
| 387 }; | 390 }; |
| 388 | 391 |
| 389 } // namespace content | 392 } // namespace content |
| 390 | 393 |
| 391 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 394 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
| OLD | NEW |