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

Side by Side Diff: content/browser/renderer_host/render_widget_helper.h

Issue 10907182: Add UMA counter for hung renderers on cross-site navigation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // if not found. NOTE: The raw pointer is for temporary use only. To retain, 119 // if not found. NOTE: The raw pointer is for temporary use only. To retain,
120 // store in a scoped_refptr. 120 // store in a scoped_refptr.
121 static RenderWidgetHelper* FromProcessHostID(int render_process_host_id); 121 static RenderWidgetHelper* FromProcessHostID(int render_process_host_id);
122 122
123 // UI THREAD ONLY ----------------------------------------------------------- 123 // UI THREAD ONLY -----------------------------------------------------------
124 124
125 // These three functions provide the backend implementation of the 125 // These three functions provide the backend implementation of the
126 // corresponding functions in RenderProcessHost. See those declarations 126 // corresponding functions in RenderProcessHost. See those declarations
127 // for documentation. 127 // for documentation.
128 void CancelResourceRequests(int render_widget_id); 128 void CancelResourceRequests(int render_widget_id);
129 void CrossSiteSwapOutACK(const ViewMsg_SwapOut_Params& params); 129 void SimulateSwapOutACK(const ViewMsg_SwapOut_Params& params);
130 bool WaitForBackingStoreMsg(int render_widget_id, 130 bool WaitForBackingStoreMsg(int render_widget_id,
131 const base::TimeDelta& max_delay, 131 const base::TimeDelta& max_delay,
132 IPC::Message* msg); 132 IPC::Message* msg);
133 // Called to resume the requests for a view after it's ready. The view was 133 // Called to resume the requests for a view after it's ready. The view was
134 // created by CreateNewWindow which initially blocked the requests. 134 // created by CreateNewWindow which initially blocked the requests.
135 void ResumeRequestsForView(int route_id); 135 void ResumeRequestsForView(int route_id);
136 136
137 #if defined(OS_MACOSX) 137 #if defined(OS_MACOSX)
138 // Given the id of a transport DIB, return a mapping to it or NULL on error. 138 // Given the id of a transport DIB, return a mapping to it or NULL on error.
139 TransportDIB* MapTransportDIB(TransportDIB::Id dib_id); 139 TransportDIB* MapTransportDIB(TransportDIB::Id dib_id);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 void OnCreateWidgetOnUI(int opener_id, 206 void OnCreateWidgetOnUI(int opener_id,
207 int route_id, 207 int route_id,
208 WebKit::WebPopupType popup_type); 208 WebKit::WebPopupType popup_type);
209 209
210 // Called on the UI thread to create a fullscreen widget. 210 // Called on the UI thread to create a fullscreen widget.
211 void OnCreateFullscreenWidgetOnUI(int opener_id, int route_id); 211 void OnCreateFullscreenWidgetOnUI(int opener_id, int route_id);
212 212
213 // Called on the IO thread to cancel resource requests for the render widget. 213 // Called on the IO thread to cancel resource requests for the render widget.
214 void OnCancelResourceRequests(int render_widget_id); 214 void OnCancelResourceRequests(int render_widget_id);
215 215
216 // Called on the IO thread to resume a cross-site response. 216 // Called on the IO thread to resume a cross-site response, if the ack is
217 void OnCrossSiteSwapOutACK(const ViewMsg_SwapOut_Params& params); 217 // not received as expected.
218 void OnSimulateSwapOutACK(const ViewMsg_SwapOut_Params& params);
218 219
219 #if defined(OS_MACOSX) 220 #if defined(OS_MACOSX)
220 // Called on destruction to release all allocated transport DIBs 221 // Called on destruction to release all allocated transport DIBs
221 void ClearAllocatedDIBs(); 222 void ClearAllocatedDIBs();
222 223
223 // On OSX we keep file descriptors to all the allocated DIBs around until 224 // On OSX we keep file descriptors to all the allocated DIBs around until
224 // the renderer frees them. 225 // the renderer frees them.
225 base::Lock allocated_dibs_lock_; 226 base::Lock allocated_dibs_lock_;
226 std::map<TransportDIB::Id, int> allocated_dibs_; 227 std::map<TransportDIB::Id, int> allocated_dibs_;
227 #endif 228 #endif
(...skipping 14 matching lines...) Expand all
242 base::AtomicSequenceNumber next_routing_id_; 243 base::AtomicSequenceNumber next_routing_id_;
243 244
244 ResourceDispatcherHostImpl* resource_dispatcher_host_; 245 ResourceDispatcherHostImpl* resource_dispatcher_host_;
245 246
246 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); 247 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper);
247 }; 248 };
248 249
249 } // namespace content 250 } // namespace content
250 251
251 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ 252 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698