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

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

Issue 1150793002: Add ref-count on RenderViewHost for each new RenderFrameProxyHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes and missed CHECK. Created 5 years, 7 months 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
« 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 int routing_id, 114 int routing_id,
115 int main_frame_routing_id, 115 int main_frame_routing_id,
116 bool swapped_out, 116 bool swapped_out,
117 bool hidden); 117 bool hidden);
118 118
119 // Returns the existing RenderViewHost for a new RenderFrameHost. 119 // Returns the existing RenderViewHost for a new RenderFrameHost.
120 // There should always be such a RenderViewHost, because the main frame 120 // There should always be such a RenderViewHost, because the main frame
121 // RenderFrameHost for each SiteInstance should be created before subframes. 121 // RenderFrameHost for each SiteInstance should be created before subframes.
122 RenderViewHostImpl* GetRenderViewHost(SiteInstance* site_instance); 122 RenderViewHostImpl* GetRenderViewHost(SiteInstance* site_instance);
123 123
124 // Keeps track of which RenderFrameHosts are using each RenderViewHost. When 124 // Keeps track of which RenderFrameHosts and RenderFrameProxyHosts are using
125 // the number drops to zero, we call Shutdown on the RenderViewHost. 125 // each RenderViewHost. When the number drops to zero, we call Shutdown on
126 void RegisterRenderFrameHost(RenderFrameHostImpl* render_frame_host); 126 // the RenderViewHost.
127 void UnregisterRenderFrameHost(RenderFrameHostImpl* render_frame_host); 127 void AddRenderViewHostRef(RenderViewHostImpl* render_view_host);
128 void ReleaseRenderViewHostRef(RenderViewHostImpl* render_view_host);
128 129
129 // This is only meant to be called by FrameTreeNode. Triggers calling 130 // This is only meant to be called by FrameTreeNode. Triggers calling
130 // the listener installed by SetFrameRemoveListener. 131 // the listener installed by SetFrameRemoveListener.
131 void FrameRemoved(FrameTreeNode* frame); 132 void FrameRemoved(FrameTreeNode* frame);
132 133
133 // Updates the overall load progress and notifies the WebContents. 134 // Updates the overall load progress and notifies the WebContents.
134 void UpdateLoadProgress(); 135 void UpdateLoadProgress();
135 136
136 // Returns this FrameTree's total load progress. 137 // Returns this FrameTree's total load progress.
137 double load_progress() { return load_progress_; } 138 double load_progress() { return load_progress_; }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 185
185 // Overall load progress. 186 // Overall load progress.
186 double load_progress_; 187 double load_progress_;
187 188
188 DISALLOW_COPY_AND_ASSIGN(FrameTree); 189 DISALLOW_COPY_AND_ASSIGN(FrameTree);
189 }; 190 };
190 191
191 } // namespace content 192 } // namespace content
192 193
193 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_ 194 #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