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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.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_VIEW_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 // different renderer process. It should run its unload handler and move to 295 // different renderer process. It should run its unload handler and move to
296 // a blank document. The renderer should preserve the Frame object until it 296 // a blank document. The renderer should preserve the Frame object until it
297 // exits, in case we come back. The renderer can exit if it has no other 297 // exits, in case we come back. The renderer can exit if it has no other
298 // active RenderViews, but not until WasSwappedOut is called (when it is no 298 // active RenderViews, but not until WasSwappedOut is called (when it is no
299 // longer visible). 299 // longer visible).
300 // 300 //
301 // Please see ViewMsg_SwapOut_Params in view_messages.h for a description 301 // Please see ViewMsg_SwapOut_Params in view_messages.h for a description
302 // of the parameters. 302 // of the parameters.
303 void SwapOut(int new_render_process_host_id, int new_request_id); 303 void SwapOut(int new_render_process_host_id, int new_request_id);
304 304
305 // Called by ResourceDispatcherHost after the SwapOutACK is received. 305 // Called by ResourceDispatcherHost after the SwapOutACK is received or the
306 void OnSwapOutACK(); 306 // response times out.
307 void OnSwapOutACK(bool timed_out);
307 308
308 // Called to notify the renderer that it has been visibly swapped out and 309 // Called to notify the renderer that it has been visibly swapped out and
309 // replaced by another RenderViewHost, after an earlier call to SwapOut. 310 // replaced by another RenderViewHost, after an earlier call to SwapOut.
310 // It is now safe for the process to exit if there are no other active 311 // It is now safe for the process to exit if there are no other active
311 // RenderViews. 312 // RenderViews.
312 void WasSwappedOut(); 313 void WasSwappedOut();
313 314
314 // Close the page ignoring whether it has unload events registers. 315 // Close the page ignoring whether it has unload events registers.
315 // This is called after the beforeunload and unload events have fired 316 // This is called after the beforeunload and unload events have fired
316 // and the user has agreed to continue with closing the page. 317 // and the user has agreed to continue with closing the page.
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 // ensures we don't spam the renderer with multiple beforeunload requests. 630 // ensures we don't spam the renderer with multiple beforeunload requests.
630 // When either this value or is_waiting_for_unload_ack_ is true, the value of 631 // When either this value or is_waiting_for_unload_ack_ is true, the value of
631 // unload_ack_is_for_cross_site_transition_ indicates whether this is for a 632 // unload_ack_is_for_cross_site_transition_ indicates whether this is for a
632 // cross-site transition or a tab close attempt. 633 // cross-site transition or a tab close attempt.
633 bool is_waiting_for_beforeunload_ack_; 634 bool is_waiting_for_beforeunload_ack_;
634 635
635 // Set to true when there is a pending ViewMsg_Close message. Also see 636 // Set to true when there is a pending ViewMsg_Close message. Also see
636 // is_waiting_for_beforeunload_ack_, unload_ack_is_for_cross_site_transition_. 637 // is_waiting_for_beforeunload_ack_, unload_ack_is_for_cross_site_transition_.
637 bool is_waiting_for_unload_ack_; 638 bool is_waiting_for_unload_ack_;
638 639
640 // Set to true when waiting for ViewHostMsg_SwapOut_ACK has timed out.
641 bool has_timed_out_on_unload_;
642
639 // Valid only when is_waiting_for_beforeunload_ack_ or 643 // Valid only when is_waiting_for_beforeunload_ack_ or
640 // is_waiting_for_unload_ack_ is true. This tells us if the unload request 644 // is_waiting_for_unload_ack_ is true. This tells us if the unload request
641 // is for closing the entire tab ( = false), or only this RenderViewHost in 645 // is for closing the entire tab ( = false), or only this RenderViewHost in
642 // the case of a cross-site transition ( = true). 646 // the case of a cross-site transition ( = true).
643 bool unload_ack_is_for_cross_site_transition_; 647 bool unload_ack_is_for_cross_site_transition_;
644 648
645 bool are_javascript_messages_suppressed_; 649 bool are_javascript_messages_suppressed_;
646 650
647 // True if the render view can be shut down suddenly. 651 // True if the render view can be shut down suddenly.
648 bool sudden_termination_allowed_; 652 bool sudden_termination_allowed_;
(...skipping 29 matching lines...) Expand all
678 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); 682 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl);
679 }; 683 };
680 684
681 #if defined(COMPILER_MSVC) 685 #if defined(COMPILER_MSVC)
682 #pragma warning(pop) 686 #pragma warning(pop)
683 #endif 687 #endif
684 688
685 } // namespace content 689 } // namespace content
686 690
687 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ 691 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698