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

Side by Side Diff: content/browser/frame_host/frame_tree.h

Issue 26316005: Move out DidStartProvisionalLoad from WebContentsImpl into Navigator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes based on Charlie's latest review. Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 void 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(RenderFrameHostImpl* render_frame_host,
82 int64 parent_frame_id,
83 int64 frame_id);
82 void SetFrameUrl(int64 frame_id, const GURL& url); 84 void SetFrameUrl(int64 frame_id, const GURL& url);
83 85
84 // Resets the FrameTree and changes RenderFrameHost for the main frame. 86 // 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 87 // 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 88 // navigation state may be kept on it between process swaps. Used to
87 // support bookkeeping for top-level navigations. 89 // support bookkeeping for top-level navigations.
88 // 90 //
89 // If |main_frame| is NULL, reset tree to initially constructed state. 91 // If |main_frame| is NULL, reset tree to initially constructed state.
90 // 92 //
91 // TODO(ajwong): This function should not be given a |main_frame|. This is 93 // TODO(ajwong): This function should not be given a |main_frame|. This is
(...skipping 16 matching lines...) Expand all
108 110
109 private: 111 private:
110 // Returns the FrameTreeNode with the given renderer-specific |frame_id|. 112 // Returns the FrameTreeNode with the given renderer-specific |frame_id|.
111 // For internal use only. 113 // For internal use only.
112 // TODO(creis): Replace this with a version that takes in a routing ID. 114 // TODO(creis): Replace this with a version that takes in a routing ID.
113 FrameTreeNode* FindByFrameID(int64 frame_id); 115 FrameTreeNode* FindByFrameID(int64 frame_id);
114 116
115 scoped_ptr<FrameTreeNode> CreateNode(int64 frame_id, 117 scoped_ptr<FrameTreeNode> CreateNode(int64 frame_id,
116 const std::string& frame_name, 118 const std::string& frame_name,
117 int render_frame_host_id, 119 int render_frame_host_id,
118 Navigator* navigator, 120 FrameTreeNode* parent_node);
119 RenderProcessHost* render_process_host);
120 121
121 // These delegates are installed into all the RenderViewHosts and 122 // These delegates are installed into all the RenderViewHosts and
122 // RenderFrameHosts that we create. 123 // RenderFrameHosts that we create.
123 RenderFrameHostDelegate* render_frame_delegate_; 124 RenderFrameHostDelegate* render_frame_delegate_;
124 RenderViewHostDelegate* render_view_delegate_; 125 RenderViewHostDelegate* render_view_delegate_;
125 RenderWidgetHostDelegate* render_widget_delegate_; 126 RenderWidgetHostDelegate* render_widget_delegate_;
126 RenderFrameHostManager::Delegate* manager_delegate_; 127 RenderFrameHostManager::Delegate* manager_delegate_;
127 128
128 scoped_ptr<FrameTreeNode> root_; 129 scoped_ptr<FrameTreeNode> root_;
129 130
130 base::Callback<void(RenderViewHostImpl*, int64)> on_frame_removed_; 131 base::Callback<void(RenderViewHostImpl*, int64)> on_frame_removed_;
131 132
132 DISALLOW_COPY_AND_ASSIGN(FrameTree); 133 DISALLOW_COPY_AND_ASSIGN(FrameTree);
133 }; 134 };
134 135
135 } // namespace content 136 } // namespace content
136 137
137 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ 138 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698