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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // after a swap. These two functions are used to set the root node's frame | 67 // after a swap. These two functions are used to set the root node's frame |
68 // id. | 68 // id. |
69 // | 69 // |
70 // TODO(ajwong): Remove these once RenderFrameHost's routing id replaces | 70 // TODO(ajwong): Remove these once RenderFrameHost's routing id replaces |
71 // frame_id. | 71 // frame_id. |
72 bool IsFirstNavigationAfterSwap() const; | 72 bool IsFirstNavigationAfterSwap() const; |
73 void OnFirstNavigationAfterSwap(int main_frame_id); | 73 void OnFirstNavigationAfterSwap(int main_frame_id); |
74 | 74 |
75 // Frame tree manipulation routines. | 75 // Frame tree manipulation routines. |
76 // TODO(creis): These should take in RenderFrameHost routing IDs. | 76 // TODO(creis): These should take in RenderFrameHost routing IDs. |
77 void AddFrame(int render_frame_host_id, | 77 RenderFrameHostImpl* AddFrame(int render_frame_host_id, |
78 int64 parent_frame_tree_node_id, | 78 int64 parent_frame_tree_node_id, |
79 int64 frame_id, | 79 int64 frame_id, |
80 const std::string& frame_name); | 80 const std::string& frame_name); |
81 void RemoveFrame(int64 parent_frame_id, int64 frame_id); | 81 void RemoveFrame(int64 parent_frame_id, int64 frame_id); |
82 void SetFrameUrl(int64 frame_id, const GURL& url); | 82 void SetFrameUrl(int64 frame_id, const GURL& url); |
83 | 83 |
84 // Resets the FrameTree and changes RenderFrameHost for the main frame. | 84 // Resets the FrameTree and changes RenderFrameHost for the main frame. |
85 // This destroys most of the frame tree but retains the root node so that | 85 // This destroys most of the frame tree but retains the root node so that |
86 // navigation state may be kept on it between process swaps. Used to | 86 // navigation state may be kept on it between process swaps. Used to |
87 // support bookkeeping for top-level navigations. | 87 // support bookkeeping for top-level navigations. |
88 // | 88 // |
89 // If |main_frame| is NULL, reset tree to initially constructed state. | 89 // If |main_frame| is NULL, reset tree to initially constructed state. |
90 // | 90 // |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 scoped_ptr<FrameTreeNode> root_; | 128 scoped_ptr<FrameTreeNode> root_; |
129 | 129 |
130 base::Callback<void(RenderViewHostImpl*, int64)> on_frame_removed_; | 130 base::Callback<void(RenderViewHostImpl*, int64)> on_frame_removed_; |
131 | 131 |
132 DISALLOW_COPY_AND_ASSIGN(FrameTree); | 132 DISALLOW_COPY_AND_ASSIGN(FrameTree); |
133 }; | 133 }; |
134 | 134 |
135 } // namespace content | 135 } // namespace content |
136 | 136 |
137 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ | 137 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ |
OLD | NEW |