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> |
| 9 |
8 #include <string> | 10 #include <string> |
9 | 11 |
10 #include "base/callback.h" | 12 #include "base/callback.h" |
11 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
13 #include "content/browser/frame_host/frame_tree_node.h" | 16 #include "content/browser/frame_host/frame_tree_node.h" |
14 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
15 | 18 |
16 namespace content { | 19 namespace content { |
17 | 20 |
18 class FrameTreeNode; | 21 class FrameTreeNode; |
19 class Navigator; | 22 class Navigator; |
20 class RenderFrameHostDelegate; | 23 class RenderFrameHostDelegate; |
21 class RenderProcessHost; | 24 class RenderProcessHost; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // Allows a client to listen for frame removal. The listener should expect | 117 // Allows a client to listen for frame removal. The listener should expect |
115 // to receive the RenderViewHostImpl containing the frame and the renderer- | 118 // to receive the RenderViewHostImpl containing the frame and the renderer- |
116 // specific frame routing ID of the removed frame. | 119 // specific frame routing ID of the removed frame. |
117 void SetFrameRemoveListener( | 120 void SetFrameRemoveListener( |
118 const base::Callback<void(RenderFrameHost*)>& on_frame_removed); | 121 const base::Callback<void(RenderFrameHost*)>& on_frame_removed); |
119 | 122 |
120 // Creates a RenderViewHost for a new RenderFrameHost in the given | 123 // Creates a RenderViewHost for a new RenderFrameHost in the given |
121 // |site_instance|. The RenderViewHost will have its Shutdown method called | 124 // |site_instance|. The RenderViewHost will have its Shutdown method called |
122 // when all of the RenderFrameHosts using it are deleted. | 125 // when all of the RenderFrameHosts using it are deleted. |
123 RenderViewHostImpl* CreateRenderViewHost(SiteInstance* site_instance, | 126 RenderViewHostImpl* CreateRenderViewHost(SiteInstance* site_instance, |
124 int32 routing_id, | 127 int32_t routing_id, |
125 int32 main_frame_routing_id, | 128 int32_t main_frame_routing_id, |
126 bool swapped_out, | 129 bool swapped_out, |
127 bool hidden); | 130 bool hidden); |
128 | 131 |
129 // Returns the existing RenderViewHost for a new RenderFrameHost. | 132 // Returns the existing RenderViewHost for a new RenderFrameHost. |
130 // There should always be such a RenderViewHost, because the main frame | 133 // There should always be such a RenderViewHost, because the main frame |
131 // RenderFrameHost for each SiteInstance should be created before subframes. | 134 // RenderFrameHost for each SiteInstance should be created before subframes. |
132 RenderViewHostImpl* GetRenderViewHost(SiteInstance* site_instance); | 135 RenderViewHostImpl* GetRenderViewHost(SiteInstance* site_instance); |
133 | 136 |
134 // Keeps track of which RenderFrameHosts and RenderFrameProxyHosts are using | 137 // Keeps track of which RenderFrameHosts and RenderFrameProxyHosts are using |
135 // each RenderViewHost. When the number drops to zero, we call Shutdown on | 138 // each RenderViewHost. When the number drops to zero, we call Shutdown on |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 | 212 |
210 // Overall load progress. | 213 // Overall load progress. |
211 double load_progress_; | 214 double load_progress_; |
212 | 215 |
213 DISALLOW_COPY_AND_ASSIGN(FrameTree); | 216 DISALLOW_COPY_AND_ASSIGN(FrameTree); |
214 }; | 217 }; |
215 | 218 |
216 } // namespace content | 219 } // namespace content |
217 | 220 |
218 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ | 221 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ |
OLD | NEW |