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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 int64 frame_id); | 85 int64 frame_id); |
86 void SetFrameUrl(int64 frame_id, const GURL& url); | 86 void SetFrameUrl(int64 frame_id, const GURL& url); |
87 | 87 |
88 // Clears process specific-state after a main frame process swap. | 88 // Clears process specific-state after a main frame process swap. |
89 // This destroys most of the frame tree but retains the root node so that | 89 // This destroys most of the frame tree but retains the root node so that |
90 // navigation state may be kept on it between process swaps. Used to | 90 // navigation state may be kept on it between process swaps. Used to |
91 // support bookkeeping for top-level navigations. | 91 // support bookkeeping for top-level navigations. |
92 // TODO(creis): Look into how we can remove the need for this method. | 92 // TODO(creis): Look into how we can remove the need for this method. |
93 void ResetForMainFrameSwap(); | 93 void ResetForMainFrameSwap(); |
94 | 94 |
| 95 // Update the frame tree after a process exits. Any nodes currently using the |
| 96 // given |render_view_host| will lose all their children. |
| 97 void RenderProcessGone(RenderViewHost* render_view_host); |
| 98 |
95 // Convenience accessor for the main frame's RenderFrameHostImpl. | 99 // Convenience accessor for the main frame's RenderFrameHostImpl. |
96 RenderFrameHostImpl* GetMainFrame() const; | 100 RenderFrameHostImpl* GetMainFrame() const; |
97 | 101 |
98 // Allows a client to listen for frame removal. The listener should expect | 102 // Allows a client to listen for frame removal. The listener should expect |
99 // to receive the RenderViewHostImpl containing the frame and the renderer- | 103 // to receive the RenderViewHostImpl containing the frame and the renderer- |
100 // specific frame ID of the removed frame. | 104 // specific frame ID of the removed frame. |
101 // TODO(creis): These parameters will later change to be the RenderFrameHost. | 105 // TODO(creis): These parameters will later change to be the RenderFrameHost. |
102 void SetFrameRemoveListener( | 106 void SetFrameRemoveListener( |
103 const base::Callback<void(RenderViewHostImpl*, int64)>& on_frame_removed); | 107 const base::Callback<void(RenderViewHostImpl*, int64)>& on_frame_removed); |
104 | 108 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 scoped_ptr<FrameTreeNode> root_; | 164 scoped_ptr<FrameTreeNode> root_; |
161 | 165 |
162 base::Callback<void(RenderViewHostImpl*, int64)> on_frame_removed_; | 166 base::Callback<void(RenderViewHostImpl*, int64)> on_frame_removed_; |
163 | 167 |
164 DISALLOW_COPY_AND_ASSIGN(FrameTree); | 168 DISALLOW_COPY_AND_ASSIGN(FrameTree); |
165 }; | 169 }; |
166 | 170 |
167 } // namespace content | 171 } // namespace content |
168 | 172 |
169 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ | 173 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ |
OLD | NEW |