Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Side by Side Diff: content/browser/frame_host/frame_tree_node.h

Issue 2156883002: Use content::FrameOwnerProperties instead of blink::WebFrameOwnerProperties in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission-delegation-frame-owner-properties
Patch Set: Use this everywhere Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/frame_host/frame_tree.cc ('k') | content/browser/frame_host/frame_tree_node.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/frame_owner_properties.h"
20 #include "content/common/frame_replication_state.h" 21 #include "content/common/frame_replication_state.h"
21 #include "third_party/WebKit/public/platform/WebInsecureRequestPolicy.h" 22 #include "third_party/WebKit/public/platform/WebInsecureRequestPolicy.h"
22 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h"
23 #include "url/gurl.h" 23 #include "url/gurl.h"
24 #include "url/origin.h" 24 #include "url/origin.h"
25 25
26 namespace content { 26 namespace content {
27 27
28 class FrameTree; 28 class FrameTree;
29 class NavigationRequest; 29 class NavigationRequest;
30 class Navigator; 30 class Navigator;
31 class RenderFrameHostImpl; 31 class RenderFrameHostImpl;
32 struct ContentSecurityPolicyHeader; 32 struct ContentSecurityPolicyHeader;
(...skipping 25 matching lines...) Expand all
58 // calling the constructor. 58 // calling the constructor.
59 FrameTreeNode(FrameTree* frame_tree, 59 FrameTreeNode(FrameTree* frame_tree,
60 Navigator* navigator, 60 Navigator* navigator,
61 RenderFrameHostDelegate* render_frame_delegate, 61 RenderFrameHostDelegate* render_frame_delegate,
62 RenderWidgetHostDelegate* render_widget_delegate, 62 RenderWidgetHostDelegate* render_widget_delegate,
63 RenderFrameHostManager::Delegate* manager_delegate, 63 RenderFrameHostManager::Delegate* manager_delegate,
64 FrameTreeNode* parent, 64 FrameTreeNode* parent,
65 blink::WebTreeScopeType scope, 65 blink::WebTreeScopeType scope,
66 const std::string& name, 66 const std::string& name,
67 const std::string& unique_name, 67 const std::string& unique_name,
68 const blink::WebFrameOwnerProperties& frame_owner_properties); 68 const FrameOwnerProperties& frame_owner_properties);
69 69
70 ~FrameTreeNode(); 70 ~FrameTreeNode();
71 71
72 void AddObserver(Observer* observer); 72 void AddObserver(Observer* observer);
73 void RemoveObserver(Observer* observer); 73 void RemoveObserver(Observer* observer);
74 74
75 bool IsMainFrame() const; 75 bool IsMainFrame() const;
76 76
77 FrameTreeNode* AddChild(std::unique_ptr<FrameTreeNode> child, 77 FrameTreeNode* AddChild(std::unique_ptr<FrameTreeNode> child,
78 int process_id, 78 int process_id,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // Update this frame's sandbox flags. This is used when a parent frame 183 // Update this frame's sandbox flags. This is used when a parent frame
184 // updates sandbox flags in the <iframe> element for this frame. These flags 184 // updates sandbox flags in the <iframe> element for this frame. These flags
185 // won't take effect until next navigation. If this frame's parent is itself 185 // won't take effect until next navigation. If this frame's parent is itself
186 // sandboxed, the parent's sandbox flags are combined with |sandbox_flags|. 186 // sandboxed, the parent's sandbox flags are combined with |sandbox_flags|.
187 void SetPendingSandboxFlags(blink::WebSandboxFlags sandbox_flags); 187 void SetPendingSandboxFlags(blink::WebSandboxFlags sandbox_flags);
188 188
189 // Set any pending sandbox flags as active, and return true if the sandbox 189 // Set any pending sandbox flags as active, and return true if the sandbox
190 // flags were changed. 190 // flags were changed.
191 bool CommitPendingSandboxFlags(); 191 bool CommitPendingSandboxFlags();
192 192
193 const blink::WebFrameOwnerProperties& frame_owner_properties() { 193 const FrameOwnerProperties& frame_owner_properties() {
194 return frame_owner_properties_; 194 return frame_owner_properties_;
195 } 195 }
196 196
197 void set_frame_owner_properties( 197 void set_frame_owner_properties(
198 const blink::WebFrameOwnerProperties& frame_owner_properties) { 198 const FrameOwnerProperties& frame_owner_properties) {
199 frame_owner_properties_ = frame_owner_properties; 199 frame_owner_properties_ = frame_owner_properties;
200 } 200 }
201 201
202 bool HasSameOrigin(const FrameTreeNode& node) const { 202 bool HasSameOrigin(const FrameTreeNode& node) const {
203 return replication_state_.origin.IsSameOriginWith( 203 return replication_state_.origin.IsSameOriginWith(
204 node.replication_state_.origin); 204 node.replication_state_.origin);
205 } 205 }
206 206
207 const FrameReplicationState& current_replication_state() const { 207 const FrameReplicationState& current_replication_state() const {
208 return replication_state_; 208 return replication_state_;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 // replication_state_.sandbox_flags when they take effect on the next frame 345 // replication_state_.sandbox_flags when they take effect on the next frame
346 // navigation. 346 // navigation.
347 blink::WebSandboxFlags pending_sandbox_flags_; 347 blink::WebSandboxFlags pending_sandbox_flags_;
348 348
349 // Tracks the scrolling and margin properties for this frame. These 349 // Tracks the scrolling and margin properties for this frame. These
350 // properties affect the child renderer but are stored on its parent's 350 // properties affect the child renderer but are stored on its parent's
351 // frame element. When this frame's parent dynamically updates these 351 // frame element. When this frame's parent dynamically updates these
352 // properties, we update them here too. 352 // properties, we update them here too.
353 // 353 //
354 // Note that dynamic updates only take effect on the next frame navigation. 354 // Note that dynamic updates only take effect on the next frame navigation.
355 blink::WebFrameOwnerProperties frame_owner_properties_; 355 FrameOwnerProperties frame_owner_properties_;
356 356
357 // Used to track this node's loading progress (from 0 to 1). 357 // Used to track this node's loading progress (from 0 to 1).
358 double loading_progress_; 358 double loading_progress_;
359 359
360 // PlzNavigate 360 // PlzNavigate
361 // Owns an ongoing NavigationRequest until it is ready to commit. It will then 361 // Owns an ongoing NavigationRequest until it is ready to commit. It will then
362 // be reset and a RenderFrameHost will be responsible for the navigation. 362 // be reset and a RenderFrameHost will be responsible for the navigation.
363 std::unique_ptr<NavigationRequest> navigation_request_; 363 std::unique_ptr<NavigationRequest> navigation_request_;
364 364
365 // List of objects observing this FrameTreeNode. 365 // List of objects observing this FrameTreeNode.
366 base::ObserverList<Observer> observers_; 366 base::ObserverList<Observer> observers_;
367 367
368 base::TimeTicks last_focus_time_; 368 base::TimeTicks last_focus_time_;
369 369
370 // A helper for tracing the snapshots of this FrameTreeNode and attributing 370 // A helper for tracing the snapshots of this FrameTreeNode and attributing
371 // browser process activities to this node (when possible). It is unrelated 371 // browser process activities to this node (when possible). It is unrelated
372 // to the core logic of FrameTreeNode. 372 // to the core logic of FrameTreeNode.
373 FrameTreeNodeBlameContext blame_context_; 373 FrameTreeNodeBlameContext blame_context_;
374 374
375 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); 375 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode);
376 }; 376 };
377 377
378 } // namespace content 378 } // namespace content
379 379
380 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ 380 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_tree.cc ('k') | content/browser/frame_host/frame_tree_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698