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

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

Issue 2136173003: Add an histogram to differentiate between hang types of the renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed asan issue Created 4 years, 5 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
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_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 13 matching lines...) Expand all
24 #include "base/time/time.h" 24 #include "base/time/time.h"
25 #include "base/timer/elapsed_timer.h" 25 #include "base/timer/elapsed_timer.h"
26 #include "build/build_config.h" 26 #include "build/build_config.h"
27 #include "cc/resources/shared_bitmap.h" 27 #include "cc/resources/shared_bitmap.h"
28 #include "content/browser/renderer_host/event_with_latency_info.h" 28 #include "content/browser/renderer_host/event_with_latency_info.h"
29 #include "content/browser/renderer_host/input/input_ack_handler.h" 29 #include "content/browser/renderer_host/input/input_ack_handler.h"
30 #include "content/browser/renderer_host/input/input_router_client.h" 30 #include "content/browser/renderer_host/input/input_router_client.h"
31 #include "content/browser/renderer_host/input/render_widget_host_latency_tracker .h" 31 #include "content/browser/renderer_host/input/render_widget_host_latency_tracker .h"
32 #include "content/browser/renderer_host/input/synthetic_gesture.h" 32 #include "content/browser/renderer_host/input/synthetic_gesture.h"
33 #include "content/browser/renderer_host/input/touch_emulator_client.h" 33 #include "content/browser/renderer_host/input/touch_emulator_client.h"
34 #include "content/browser/renderer_host/render_widget_host_delegate.h"
34 #include "content/browser/renderer_host/render_widget_host_view_base.h" 35 #include "content/browser/renderer_host/render_widget_host_view_base.h"
35 #include "content/common/input/input_event_ack_state.h" 36 #include "content/common/input/input_event_ack_state.h"
36 #include "content/common/input/synthetic_gesture_packet.h" 37 #include "content/common/input/synthetic_gesture_packet.h"
37 #include "content/common/view_message_enums.h" 38 #include "content/common/view_message_enums.h"
38 #include "content/public/browser/readback_types.h" 39 #include "content/public/browser/readback_types.h"
39 #include "content/public/browser/render_widget_host.h" 40 #include "content/public/browser/render_widget_host.h"
40 #include "content/public/common/page_zoom.h" 41 #include "content/public/common/page_zoom.h"
41 #include "ipc/ipc_listener.h" 42 #include "ipc/ipc_listener.h"
42 #include "third_party/WebKit/public/platform/WebDisplayMode.h" 43 #include "third_party/WebKit/public/platform/WebDisplayMode.h"
43 #include "ui/base/ime/text_input_mode.h" 44 #include "ui/base/ime/text_input_mode.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 77
77 namespace gfx { 78 namespace gfx {
78 class Range; 79 class Range;
79 } 80 }
80 81
81 namespace content { 82 namespace content {
82 83
83 class BrowserAccessibilityManager; 84 class BrowserAccessibilityManager;
84 class InputRouter; 85 class InputRouter;
85 class MockRenderWidgetHost; 86 class MockRenderWidgetHost;
86 class RenderWidgetHostDelegate;
87 class RenderWidgetHostOwnerDelegate; 87 class RenderWidgetHostOwnerDelegate;
88 class SyntheticGestureController; 88 class SyntheticGestureController;
89 class TimeoutMonitor; 89 class TimeoutMonitor;
90 class TouchEmulator; 90 class TouchEmulator;
91 class WebCursor; 91 class WebCursor;
92 struct EditCommand; 92 struct EditCommand;
93 struct ResizeParams; 93 struct ResizeParams;
94 struct TextInputState; 94 struct TextInputState;
95 95
96 // This implements the RenderWidgetHost interface that is exposed to 96 // This implements the RenderWidgetHost interface that is exposed to
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 bool resize_ack_pending_for_testing() { return resize_ack_pending_; } 280 bool resize_ack_pending_for_testing() { return resize_ack_pending_; }
281 281
282 // GPU accelerated version of GetBackingStore function. This will 282 // GPU accelerated version of GetBackingStore function. This will
283 // trigger a re-composite to the view. It may fail if a resize is pending, or 283 // trigger a re-composite to the view. It may fail if a resize is pending, or
284 // if a composite has already been requested and not acked yet. 284 // if a composite has already been requested and not acked yet.
285 bool ScheduleComposite(); 285 bool ScheduleComposite();
286 286
287 // Starts a hang monitor timeout. If there's already a hang monitor timeout 287 // Starts a hang monitor timeout. If there's already a hang monitor timeout
288 // the new one will only fire if it has a shorter delay than the time 288 // the new one will only fire if it has a shorter delay than the time
289 // left on the existing timeouts. 289 // left on the existing timeouts.
290 void StartHangMonitorTimeout(base::TimeDelta delay); 290 void StartHangMonitorTimeout(
291 base::TimeDelta delay,
292 RenderWidgetHostDelegate::RendererUnresponsiveType hang_monitor_reason);
291 293
292 // Stops all existing hang monitor timeouts and assumes the renderer is 294 // Stops all existing hang monitor timeouts and assumes the renderer is
293 // responsive. 295 // responsive.
294 void StopHangMonitorTimeout(); 296 void StopHangMonitorTimeout();
295 297
296 // Starts the rendering timeout, which will clear displayed graphics if 298 // Starts the rendering timeout, which will clear displayed graphics if
297 // a new compositor frame is not received before it expires. 299 // a new compositor frame is not received before it expires.
298 void StartNewContentRenderingTimeout(); 300 void StartNewContentRenderingTimeout();
299 301
300 // Notification that a new compositor frame has been generated following 302 // Notification that a new compositor frame has been generated following
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 807
806 // Indicates whether this RenderWidgetHost thinks is focused. This is trying 808 // Indicates whether this RenderWidgetHost thinks is focused. This is trying
807 // to match what the renderer process knows. It is different from 809 // to match what the renderer process knows. It is different from
808 // RenderWidgetHostView::HasFocus in that in that the focus request may fail, 810 // RenderWidgetHostView::HasFocus in that in that the focus request may fail,
809 // causing HasFocus to return false when is_focused_ is true. 811 // causing HasFocus to return false when is_focused_ is true.
810 bool is_focused_; 812 bool is_focused_;
811 813
812 // This value indicates how long to wait before we consider a renderer hung. 814 // This value indicates how long to wait before we consider a renderer hung.
813 base::TimeDelta hung_renderer_delay_; 815 base::TimeDelta hung_renderer_delay_;
814 816
817 // Stores the reason the hang_monitor_timeout_ has been started. Used to
818 // report histograms if the renderer is hung.
819 RenderWidgetHostDelegate::RendererUnresponsiveType hang_monitor_reason_;
820
815 // This value indicates how long to wait for a new compositor frame from a 821 // This value indicates how long to wait for a new compositor frame from a
816 // renderer process before clearing any previously displayed content. 822 // renderer process before clearing any previously displayed content.
817 base::TimeDelta new_content_rendering_delay_; 823 base::TimeDelta new_content_rendering_delay_;
818 824
819 #if defined(OS_MACOSX) 825 #if defined(OS_MACOSX)
820 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_; 826 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_;
821 #endif 827 #endif
822 828
823 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 829 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
824 830
825 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 831 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
826 }; 832 };
827 833
828 } // namespace content 834 } // namespace content
829 835
830 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 836 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_delegate.h ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698