| 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_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // if |on_node| is just doing a search over the tree. The iteration proceeds | 71 // if |on_node| is just doing a search over the tree. The iteration proceeds |
| 72 // top-down and visits a node before adding its children to the queue, making | 72 // top-down and visits a node before adding its children to the queue, making |
| 73 // it safe to remove children during the callback. | 73 // it safe to remove children during the callback. |
| 74 void ForEach(const base::Callback<bool(FrameTreeNode*)>& on_node) const; | 74 void ForEach(const base::Callback<bool(FrameTreeNode*)>& on_node) const; |
| 75 | 75 |
| 76 // Frame tree manipulation routines. | 76 // Frame tree manipulation routines. |
| 77 // |process_id| is required to disambiguate |new_routing_id|, and it must | 77 // |process_id| is required to disambiguate |new_routing_id|, and it must |
| 78 // match the process of the |parent| node. Otherwise this method returns | 78 // match the process of the |parent| node. Otherwise this method returns |
| 79 // nullptr. Passing MSG_ROUTING_NONE for |new_routing_id| will allocate a new | 79 // nullptr. Passing MSG_ROUTING_NONE for |new_routing_id| will allocate a new |
| 80 // routing ID for the new frame. | 80 // routing ID for the new frame. |
| 81 RenderFrameHostImpl* AddFrame(FrameTreeNode* parent, | 81 RenderFrameHostImpl* AddFrame( |
| 82 int process_id, | 82 FrameTreeNode* parent, |
| 83 int new_routing_id, | 83 int process_id, |
| 84 blink::WebTreeScopeType scope, | 84 int new_routing_id, |
| 85 const std::string& frame_name, | 85 blink::WebTreeScopeType scope, |
| 86 blink::WebSandboxFlags sandbox_flags); | 86 const std::string& frame_name, |
| 87 blink::WebSandboxFlags sandbox_flags, |
| 88 const blink::WebFrameOwnerProperties& frame_owner_properties); |
| 87 void RemoveFrame(FrameTreeNode* child); | 89 void RemoveFrame(FrameTreeNode* child); |
| 88 | 90 |
| 89 // This method walks the entire frame tree and creates a RenderFrameProxyHost | 91 // This method walks the entire frame tree and creates a RenderFrameProxyHost |
| 90 // for the given |site_instance| in each node except the |source| one -- | 92 // for the given |site_instance| in each node except the |source| one -- |
| 91 // the source will have a RenderFrameHost. |source| may be null if there is | 93 // the source will have a RenderFrameHost. |source| may be null if there is |
| 92 // no node navigating in this frame tree (such as when this is called | 94 // no node navigating in this frame tree (such as when this is called |
| 93 // for an opener's frame tree), in which case no nodes are skipped for | 95 // for an opener's frame tree), in which case no nodes are skipped for |
| 94 // RenderFrameProxyHost creation. | 96 // RenderFrameProxyHost creation. |
| 95 void CreateProxiesForSiteInstance(FrameTreeNode* source, | 97 void CreateProxiesForSiteInstance(FrameTreeNode* source, |
| 96 SiteInstance* site_instance); | 98 SiteInstance* site_instance); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 | 194 |
| 193 // Overall load progress. | 195 // Overall load progress. |
| 194 double load_progress_; | 196 double load_progress_; |
| 195 | 197 |
| 196 DISALLOW_COPY_AND_ASSIGN(FrameTree); | 198 DISALLOW_COPY_AND_ASSIGN(FrameTree); |
| 197 }; | 199 }; |
| 198 | 200 |
| 199 } // namespace content | 201 } // namespace content |
| 200 | 202 |
| 201 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ | 203 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ |
| OLD | NEW |