Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Unified Diff: content/browser/frame_host/frame_tree.h

Issue 72233002: Move RenderViewHostManager from WebContents to FrameTreeNode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial patch Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/frame_tree.h
diff --git a/content/browser/frame_host/frame_tree.h b/content/browser/frame_host/frame_tree.h
index 91a0c29fb5eb27421d3eff2de4644c8b4867efa5..bcc2b7e6675ec814d8b3702d571025bc3cb1c1cb 100644
--- a/content/browser/frame_host/frame_tree.h
+++ b/content/browser/frame_host/frame_tree.h
@@ -17,7 +17,10 @@ namespace content {
class FrameTreeNode;
class Navigator;
class RenderProcessHost;
+class RenderViewHostDelegate;
class RenderViewHostImpl;
+class RenderViewHostManager;
+class RenderWidgetHostDelegate;
// Represents the frame tree for a page. With the exception of the main frame,
// all FrameTreeNodes will be created/deleted in response to frame attach and
@@ -38,7 +41,13 @@ class CONTENT_EXPORT FrameTree {
public:
// Each FrameTreeNode will default to using the given |navigator| for
// navigation tasks in the frame.
- FrameTree(Navigator* navigator);
+ // A set of delegates are remembered here so that we can create
+ // RenderViewHostManagers. TODO(creis): This set of delegates will change as
nasko 2013/11/14 08:23:38 nit: TODO on a new line?
Charlie Reis 2013/11/14 19:01:16 Done.
+ // we move things to Navigator.
+ FrameTree(Navigator* navigator,
+ RenderViewHostDelegate* render_view_delegate,
+ RenderWidgetHostDelegate* render_widget_delegate,
+ RenderViewHostManager::Delegate* manager_delegate);
~FrameTree();
// Returns the FrameTreeNode with the given |frame_tree_node_id|.
@@ -92,7 +101,7 @@ class CONTENT_EXPORT FrameTree {
void SetFrameRemoveListener(
const base::Callback<void(RenderViewHostImpl*, int64)>& on_frame_removed);
- FrameTreeNode* GetRootForTesting() { return root_.get(); }
+ FrameTreeNode* root() const { return root_.get(); }
private:
// Returns the FrameTreeNode with the given renderer-specific |frame_id|.
@@ -106,6 +115,12 @@ class CONTENT_EXPORT FrameTree {
Navigator* navigator,
RenderProcessHost* render_process_host);
+ // These delegates are installed into all the RenderViewHosts and
+ // RenderFrameHosts that we create.
+ RenderViewHostDelegate* render_view_delegate_;
+ RenderWidgetHostDelegate* render_widget_delegate_;
+ RenderViewHostManager::Delegate* manager_delegate_;
+
scoped_ptr<FrameTreeNode> root_;
base::Callback<void(RenderViewHostImpl*, int64)> on_frame_removed_;
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree.cc » ('j') | content/browser/frame_host/frame_tree_node.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698