| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 FrameTreeNode* source, | 84 FrameTreeNode* source, |
| 85 SiteInstance* site_instance); | 85 SiteInstance* site_instance); |
| 86 | 86 |
| 87 // Clears process specific-state after a main frame process swap. | 87 // Clears process specific-state after a main frame process swap. |
| 88 // This destroys most of the frame tree but retains the root node so that | 88 // This destroys most of the frame tree but retains the root node so that |
| 89 // navigation state may be kept on it between process swaps. Used to | 89 // navigation state may be kept on it between process swaps. Used to |
| 90 // support bookkeeping for top-level navigations. | 90 // support bookkeeping for top-level navigations. |
| 91 // TODO(creis): Look into how we can remove the need for this method. | 91 // TODO(creis): Look into how we can remove the need for this method. |
| 92 void ResetForMainFrameSwap(); | 92 void ResetForMainFrameSwap(); |
| 93 | 93 |
| 94 // Update the frame tree after a process exits. Any nodes currently using the | |
| 95 // given |render_view_host| will lose all their children. | |
| 96 // TODO(creis): This should take a RenderProcessHost once RenderFrameHost | |
| 97 // knows its process. Until then, we would just be asking the RenderViewHost | |
| 98 // for its process, so we'll skip that step. | |
| 99 void RenderProcessGone(RenderViewHost* render_view_host); | |
| 100 | |
| 101 // Convenience accessor for the main frame's RenderFrameHostImpl. | 94 // Convenience accessor for the main frame's RenderFrameHostImpl. |
| 102 RenderFrameHostImpl* GetMainFrame() const; | 95 RenderFrameHostImpl* GetMainFrame() const; |
| 103 | 96 |
| 104 // Returns the focused frame. | 97 // Returns the focused frame. |
| 105 FrameTreeNode* GetFocusedFrame(); | 98 FrameTreeNode* GetFocusedFrame(); |
| 106 | 99 |
| 107 // Sets the focused frame. | 100 // Sets the focused frame. |
| 108 void SetFocusedFrame(FrameTreeNode* node); | 101 void SetFocusedFrame(FrameTreeNode* node); |
| 109 | 102 |
| 110 // Allows a client to listen for frame removal. The listener should expect | 103 // Allows a client to listen for frame removal. The listener should expect |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 int64 focused_frame_tree_node_id_; | 163 int64 focused_frame_tree_node_id_; |
| 171 | 164 |
| 172 base::Callback<void(RenderFrameHost*)> on_frame_removed_; | 165 base::Callback<void(RenderFrameHost*)> on_frame_removed_; |
| 173 | 166 |
| 174 DISALLOW_COPY_AND_ASSIGN(FrameTree); | 167 DISALLOW_COPY_AND_ASSIGN(FrameTree); |
| 175 }; | 168 }; |
| 176 | 169 |
| 177 } // namespace content | 170 } // namespace content |
| 178 | 171 |
| 179 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ | 172 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ |
| OLD | NEW |