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

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

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