| 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/render_frame_host_impl.h" | 16 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 17 #include "content/browser/frame_host/render_frame_host_manager.h" | 17 #include "content/browser/frame_host/render_frame_host_manager.h" |
| 18 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
| 19 #include "content/common/frame_replication_state.h" | 19 #include "content/common/frame_replication_state.h" |
| 20 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" | 20 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" |
| 21 #include "url/gurl.h" | 21 #include "url/gurl.h" |
| 22 #include "url/origin.h" | 22 #include "url/origin.h" |
| 23 | 23 |
| 24 namespace content { | 24 namespace content { |
| 25 | 25 |
| 26 class FrameTree; | 26 class FrameTree; |
| 27 class NavigationRequest; | 27 class NavigationRequest; |
| 28 class Navigator; | 28 class Navigator; |
| 29 class RenderFrameHostImpl; | 29 class RenderFrameHostImpl; |
| 30 struct ContentSecurityPolicyHeader; |
| 30 | 31 |
| 31 // When a page contains iframes, its renderer process maintains a tree structure | 32 // When a page contains iframes, its renderer process maintains a tree structure |
| 32 // of those frames. We are mirroring this tree in the browser process. This | 33 // of those frames. We are mirroring this tree in the browser process. This |
| 33 // class represents a node in this tree and is a wrapper for all objects that | 34 // class represents a node in this tree and is a wrapper for all objects that |
| 34 // are frame-specific (as opposed to page-specific). | 35 // are frame-specific (as opposed to page-specific). |
| 35 class CONTENT_EXPORT FrameTreeNode { | 36 class CONTENT_EXPORT FrameTreeNode { |
| 36 public: | 37 public: |
| 37 class Observer { | 38 class Observer { |
| 38 public: | 39 public: |
| 39 // Invoked when a FrameTreeNode is being destroyed. | 40 // Invoked when a FrameTreeNode is being destroyed. |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 return replication_state_.origin; | 139 return replication_state_.origin; |
| 139 } | 140 } |
| 140 | 141 |
| 141 // Set the current origin and notify proxies about the update. | 142 // Set the current origin and notify proxies about the update. |
| 142 void SetCurrentOrigin(const url::Origin& origin, | 143 void SetCurrentOrigin(const url::Origin& origin, |
| 143 bool is_potentially_trustworthy_unique_origin); | 144 bool is_potentially_trustworthy_unique_origin); |
| 144 | 145 |
| 145 // Set the current name and notify proxies about the update. | 146 // Set the current name and notify proxies about the update. |
| 146 void SetFrameName(const std::string& name, const std::string& unique_name); | 147 void SetFrameName(const std::string& name, const std::string& unique_name); |
| 147 | 148 |
| 149 // Add CSP header to replication state and notify proxies about the update. |
| 150 void AddContentSecurityPolicy(const ContentSecurityPolicyHeader& header); |
| 151 |
| 152 // Discards previous CSP headers and notifies proxies about the update. |
| 153 // Typically invoked after navigating to a new document (which comes with a |
| 154 // fresh set of CSP http headers). |
| 155 void ResetContentSecurityPolicy(); |
| 156 |
| 148 // Sets the current enforcement of strict mixed content checking and | 157 // Sets the current enforcement of strict mixed content checking and |
| 149 // notifies proxies about the update. | 158 // notifies proxies about the update. |
| 150 void SetEnforceStrictMixedContentChecking(bool should_enforce); | 159 void SetEnforceStrictMixedContentChecking(bool should_enforce); |
| 151 | 160 |
| 152 // Returns the currently active sandbox flags for this frame. This includes | 161 // Returns the currently active sandbox flags for this frame. This includes |
| 153 // flags inherited from parent frames and the currently active flags from the | 162 // flags inherited from parent frames and the currently active flags from the |
| 154 // <iframe> element hosting this frame. This does not include flags that | 163 // <iframe> element hosting this frame. This does not include flags that |
| 155 // have been updated in an <iframe> element but have not taken effect yet; | 164 // have been updated in an <iframe> element but have not taken effect yet; |
| 156 // use pending_sandbox_flags() for those. | 165 // use pending_sandbox_flags() for those. |
| 157 blink::WebSandboxFlags effective_sandbox_flags() const { | 166 blink::WebSandboxFlags effective_sandbox_flags() const { |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 base::ObserverList<Observer> observers_; | 359 base::ObserverList<Observer> observers_; |
| 351 | 360 |
| 352 base::TimeTicks last_focus_time_; | 361 base::TimeTicks last_focus_time_; |
| 353 | 362 |
| 354 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); | 363 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); |
| 355 }; | 364 }; |
| 356 | 365 |
| 357 } // namespace content | 366 } // namespace content |
| 358 | 367 |
| 359 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 368 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
| OLD | NEW |