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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <iterator> | 10 #include <iterator> |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "base/callback.h" | 14 #include "base/callback.h" |
15 #include "base/gtest_prod_util.h" | 15 #include "base/gtest_prod_util.h" |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "content/browser/frame_host/frame_tree_node.h" | 17 #include "content/browser/frame_host/frame_tree_node.h" |
18 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
19 | 19 |
20 namespace content { | 20 namespace content { |
21 | 21 |
| 22 struct FrameOwnerProperties; |
22 class Navigator; | 23 class Navigator; |
23 class RenderFrameHostDelegate; | 24 class RenderFrameHostDelegate; |
24 class RenderProcessHost; | 25 class RenderProcessHost; |
25 class RenderViewHostDelegate; | 26 class RenderViewHostDelegate; |
26 class RenderViewHostImpl; | 27 class RenderViewHostImpl; |
27 class RenderFrameHostManager; | 28 class RenderFrameHostManager; |
28 class RenderWidgetHostDelegate; | 29 class RenderWidgetHostDelegate; |
29 | 30 |
30 // Represents the frame tree for a page. With the exception of the main frame, | 31 // Represents the frame tree for a page. With the exception of the main frame, |
31 // all FrameTreeNodes will be created/deleted in response to frame attach and | 32 // all FrameTreeNodes will be created/deleted in response to frame attach and |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 // Adds a new child frame to the frame tree. |process_id| is required to | 120 // Adds a new child frame to the frame tree. |process_id| is required to |
120 // disambiguate |new_routing_id|, and it must match the process of the | 121 // disambiguate |new_routing_id|, and it must match the process of the |
121 // |parent| node. Otherwise no child is added and this method returns false. | 122 // |parent| node. Otherwise no child is added and this method returns false. |
122 bool AddFrame(FrameTreeNode* parent, | 123 bool AddFrame(FrameTreeNode* parent, |
123 int process_id, | 124 int process_id, |
124 int new_routing_id, | 125 int new_routing_id, |
125 blink::WebTreeScopeType scope, | 126 blink::WebTreeScopeType scope, |
126 const std::string& frame_name, | 127 const std::string& frame_name, |
127 const std::string& frame_unique_name, | 128 const std::string& frame_unique_name, |
128 blink::WebSandboxFlags sandbox_flags, | 129 blink::WebSandboxFlags sandbox_flags, |
129 const blink::WebFrameOwnerProperties& frame_owner_properties); | 130 const FrameOwnerProperties& frame_owner_properties); |
130 | 131 |
131 // Removes a frame from the frame tree. |child|, its children, and objects | 132 // Removes a frame from the frame tree. |child|, its children, and objects |
132 // owned by their RenderFrameHostManagers are immediately deleted. The root | 133 // owned by their RenderFrameHostManagers are immediately deleted. The root |
133 // node cannot be removed this way. | 134 // node cannot be removed this way. |
134 void RemoveFrame(FrameTreeNode* child); | 135 void RemoveFrame(FrameTreeNode* child); |
135 | 136 |
136 // This method walks the entire frame tree and creates a RenderFrameProxyHost | 137 // This method walks the entire frame tree and creates a RenderFrameProxyHost |
137 // for the given |site_instance| in each node except the |source| one -- | 138 // for the given |site_instance| in each node except the |source| one -- |
138 // the source will have a RenderFrameHost. |source| may be null if there is | 139 // the source will have a RenderFrameHost. |source| may be null if there is |
139 // no node navigating in this frame tree (such as when this is called | 140 // no node navigating in this frame tree (such as when this is called |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 | 247 |
247 // Overall load progress. | 248 // Overall load progress. |
248 double load_progress_; | 249 double load_progress_; |
249 | 250 |
250 DISALLOW_COPY_AND_ASSIGN(FrameTree); | 251 DISALLOW_COPY_AND_ASSIGN(FrameTree); |
251 }; | 252 }; |
252 | 253 |
253 } // namespace content | 254 } // namespace content |
254 | 255 |
255 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ | 256 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ |
OLD | NEW |