OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 Loading... | |
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 type); | |
nasko
2016/07/12 17:18:02
Shouldn't this be the hang monitor reason or type?
clamy
2016/07/13 10:02:22
Done.
| |
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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
810 | 812 |
811 // Indicates whether this RenderWidgetHost thinks is focused. This is trying | 813 // Indicates whether this RenderWidgetHost thinks is focused. This is trying |
812 // to match what the renderer process knows. It is different from | 814 // to match what the renderer process knows. It is different from |
813 // RenderWidgetHostView::HasFocus in that in that the focus request may fail, | 815 // RenderWidgetHostView::HasFocus in that in that the focus request may fail, |
814 // causing HasFocus to return false when is_focused_ is true. | 816 // causing HasFocus to return false when is_focused_ is true. |
815 bool is_focused_; | 817 bool is_focused_; |
816 | 818 |
817 // This value indicates how long to wait before we consider a renderer hung. | 819 // This value indicates how long to wait before we consider a renderer hung. |
818 base::TimeDelta hung_renderer_delay_; | 820 base::TimeDelta hung_renderer_delay_; |
819 | 821 |
822 // Stores the reason the hang_monitor_timeout_ i sbeing used, to report | |
nasko
2016/07/12 17:18:03
nit: "is being" or "has been started. Used to ..."
clamy
2016/07/13 10:02:21
Done.
| |
823 // histograms if the renderer is hung. | |
824 RenderWidgetHostDelegate::RendererUnresponsiveType hang_type_; | |
nasko
2016/07/12 17:18:02
nit: hang_monitor_type_ or hang_monitor_reason_?
clamy
2016/07/13 10:02:22
Done.
| |
825 | |
820 // This value indicates how long to wait for a new compositor frame from a | 826 // This value indicates how long to wait for a new compositor frame from a |
821 // renderer process before clearing any previously displayed content. | 827 // renderer process before clearing any previously displayed content. |
822 base::TimeDelta new_content_rendering_delay_; | 828 base::TimeDelta new_content_rendering_delay_; |
823 | 829 |
824 #if defined(OS_MACOSX) | 830 #if defined(OS_MACOSX) |
825 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_; | 831 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_; |
826 #endif | 832 #endif |
827 | 833 |
828 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 834 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
829 | 835 |
830 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 836 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
831 }; | 837 }; |
832 | 838 |
833 } // namespace content | 839 } // namespace content |
834 | 840 |
835 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 841 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |