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(RenderFrameHostImpl* render_frame_host, | 81 void RemoveFrame(RenderFrameHostImpl* render_frame_host, |
82 int64 parent_frame_id, | 82 int64 parent_frame_id, |
83 int64 frame_id); | 83 int64 frame_id); |
84 void SetFrameUrl(int64 frame_id, const GURL& url); | 84 void SetFrameUrl(int64 frame_id, const GURL& url); |
85 | 85 |
86 // Resets the FrameTree and changes RenderFrameHost for the main frame. | 86 // Resets the FrameTree and changes RenderFrameHost for the main frame. |
87 // This destroys most of the frame tree but retains the root node so that | 87 // This destroys most of the frame tree but retains the root node so that |
88 // navigation state may be kept on it between process swaps. Used to | 88 // navigation state may be kept on it between process swaps. Used to |
89 // support bookkeeping for top-level navigations. | 89 // support bookkeeping for top-level navigations. |
90 // | 90 // |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 scoped_ptr<FrameTreeNode> root_; | 129 scoped_ptr<FrameTreeNode> root_; |
130 | 130 |
131 base::Callback<void(RenderViewHostImpl*, int64)> on_frame_removed_; | 131 base::Callback<void(RenderViewHostImpl*, int64)> on_frame_removed_; |
132 | 132 |
133 DISALLOW_COPY_AND_ASSIGN(FrameTree); | 133 DISALLOW_COPY_AND_ASSIGN(FrameTree); |
134 }; | 134 }; |
135 | 135 |
136 } // namespace content | 136 } // namespace content |
137 | 137 |
138 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ | 138 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ |
OLD | NEW |