Chromium Code Reviews| Index: content/browser/renderer_host/frame_tree.h |
| diff --git a/content/browser/renderer_host/frame_tree.h b/content/browser/renderer_host/frame_tree.h |
| index 8c452e93e5d7fb70b742baaf9c6933c62815fcac..c042acdaa003b4d7d6486814a15c42e557f1d7ca 100644 |
| --- a/content/browser/renderer_host/frame_tree.h |
| +++ b/content/browser/renderer_host/frame_tree.h |
| @@ -15,6 +15,9 @@ |
| namespace content { |
| class FrameTreeNode; |
| +class NavigationControllerImpl; |
| +class Navigator; |
| +class NavigatorObserver; |
| class RenderProcessHost; |
| class RenderViewHostImpl; |
| @@ -38,6 +41,13 @@ class CONTENT_EXPORT FrameTree { |
| FrameTree(); |
| ~FrameTree(); |
| + // Initializes the frame tree with a NavigationController which keeps |
| + // session history for it and NavigationObserver which dispatches |
|
Charlie Reis
2013/10/17 00:17:25
This doesn't seem to match the observer pattern, w
|
| + // notifications for navigation events. |
| + void Init( |
| + NavigationControllerImpl* navigation_controller, |
| + NavigatorObserver* navigator_observer); |
| + |
| // Returns the FrameTreeNode with the given |frame_id|. |
| FrameTreeNode* FindByID(int64 frame_id); |
| @@ -85,16 +95,27 @@ class CONTENT_EXPORT FrameTree { |
| FrameTreeNode* GetRootForTesting() { return root_.get(); } |
| + Navigator* navigator() { |
| + return navigator_.get(); |
| + } |
| + |
| private: |
| scoped_ptr<FrameTreeNode> CreateNode(int64 frame_id, |
| const std::string& frame_name, |
| int render_frame_host_id, |
| RenderProcessHost* render_process_host); |
| + // The root node for the frame tree. |
| scoped_ptr<FrameTreeNode> root_; |
| + // Callback which is invoked when a FrameTreeNode is removed from the |
| + // tree. |
| base::Callback<void(RenderViewHostImpl*, int64)> on_frame_removed_; |
| + // This is passed in to all FrameTreeNode objects which use it for |
| + // performing navigations. |
| + scoped_ptr<Navigator> navigator_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(FrameTree); |
| }; |