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 <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
256 void StartHangMonitorTimeout(base::TimeDelta delay); | 256 void StartHangMonitorTimeout(base::TimeDelta delay); |
257 | 257 |
258 // Stops all existing hang monitor timeouts and assumes the renderer is | 258 // Stops all existing hang monitor timeouts and assumes the renderer is |
259 // responsive. | 259 // responsive. |
260 void StopHangMonitorTimeout(); | 260 void StopHangMonitorTimeout(); |
261 | 261 |
262 // Starts the rendering timeout, which will clear displayed graphics if | 262 // Starts the rendering timeout, which will clear displayed graphics if |
263 // a new compositor frame is not received before it expires. | 263 // a new compositor frame is not received before it expires. |
264 void StartNewContentRenderingTimeout(); | 264 void StartNewContentRenderingTimeout(); |
265 | 265 |
266 // Stops the rendering timeout and prevents it from clearing any displayed | 266 // Notification that a new compositor frame has been generated following |
267 // graphics. | 267 // a page load. This stops |new_content_rendering_timeout_|, or prevents |
268 void StopNewContentRenderingTimeout(); | 268 // the timer from running if the load commit message hasn't been received |
269 // yet. | |
270 void OnFirstPaintAfterLoad(); | |
269 | 271 |
270 // Forwards the given message to the renderer. These are called by the view | 272 // Forwards the given message to the renderer. These are called by the view |
271 // when it has received a message. | 273 // when it has received a message. |
272 void ForwardGestureEventWithLatencyInfo( | 274 void ForwardGestureEventWithLatencyInfo( |
273 const blink::WebGestureEvent& gesture_event, | 275 const blink::WebGestureEvent& gesture_event, |
274 const ui::LatencyInfo& ui_latency); | 276 const ui::LatencyInfo& ui_latency); |
275 void ForwardTouchEventWithLatencyInfo( | 277 void ForwardTouchEventWithLatencyInfo( |
276 const blink::WebTouchEvent& touch_event, | 278 const blink::WebTouchEvent& touch_event, |
277 const ui::LatencyInfo& ui_latency); | 279 const ui::LatencyInfo& ui_latency); |
278 void ForwardMouseEventWithLatencyInfo( | 280 void ForwardMouseEventWithLatencyInfo( |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
803 scoped_ptr<SyntheticGestureController> synthetic_gesture_controller_; | 805 scoped_ptr<SyntheticGestureController> synthetic_gesture_controller_; |
804 | 806 |
805 scoped_ptr<TouchEmulator> touch_emulator_; | 807 scoped_ptr<TouchEmulator> touch_emulator_; |
806 | 808 |
807 // Receives and handles all input events. | 809 // Receives and handles all input events. |
808 scoped_ptr<InputRouter> input_router_; | 810 scoped_ptr<InputRouter> input_router_; |
809 | 811 |
810 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_; | 812 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_; |
811 | 813 |
812 scoped_ptr<TimeoutMonitor> new_content_rendering_timeout_; | 814 scoped_ptr<TimeoutMonitor> new_content_rendering_timeout_; |
815 // This boolean is true if RenderWidgetHostImpl receives a compositor frame | |
Charlie Reis
2015/09/30 21:42:09
nit: Add blank line above.
kenrb
2015/10/01 12:45:09
Done.
| |
816 // from a newly loaded page before OnFirstPaintAfterLoad() is called. In | |
Charlie Reis
2015/09/30 21:42:09
Wait, that's not right. It's true if the composit
kenrb
2015/10/01 12:45:09
Rewritten and expanded.
| |
817 // that case |new_content_rendering_timeout_| is not needed, because the | |
818 // paint preceded the load commit notification. | |
819 bool received_paint_after_load_; | |
813 | 820 |
814 #if defined(OS_WIN) | 821 #if defined(OS_WIN) |
815 std::list<HWND> dummy_windows_for_activation_; | 822 std::list<HWND> dummy_windows_for_activation_; |
816 #endif | 823 #endif |
817 | 824 |
818 RenderWidgetHostLatencyTracker latency_tracker_; | 825 RenderWidgetHostLatencyTracker latency_tracker_; |
819 | 826 |
820 int next_browser_snapshot_id_; | 827 int next_browser_snapshot_id_; |
821 using PendingSnapshotMap = std::map<int, GetSnapshotFromBrowserCallback>; | 828 using PendingSnapshotMap = std::map<int, GetSnapshotFromBrowserCallback>; |
822 PendingSnapshotMap pending_browser_snapshots_; | 829 PendingSnapshotMap pending_browser_snapshots_; |
823 | 830 |
824 // Indicates whether a RenderFramehost has ownership, in which case this | 831 // Indicates whether a RenderFramehost has ownership, in which case this |
825 // object does not self destroy. | 832 // object does not self destroy. |
826 bool owned_by_render_frame_host_; | 833 bool owned_by_render_frame_host_; |
827 | 834 |
828 // Indicates whether this RenderWidgetHost thinks is focused. This is trying | 835 // Indicates whether this RenderWidgetHost thinks is focused. This is trying |
829 // to match what the renderer process knows. It is different from | 836 // to match what the renderer process knows. It is different from |
830 // RenderWidgetHostView::HasFocus in that in that the focus request may fail, | 837 // RenderWidgetHostView::HasFocus in that in that the focus request may fail, |
831 // causing HasFocus to return false when is_focused_ is true. | 838 // causing HasFocus to return false when is_focused_ is true. |
832 bool is_focused_; | 839 bool is_focused_; |
833 | 840 |
834 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 841 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
835 | 842 |
836 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 843 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
837 }; | 844 }; |
838 | 845 |
839 } // namespace content | 846 } // namespace content |
840 | 847 |
841 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 848 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |