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

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

Issue 1376003002: Make rendering timeouts work even if paint data received early (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cursor
Patch Set: Rebase that maybe works this time Created 5 years, 2 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 <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Stops the rendering timeout and prevents it from clearing any displayed
267 // graphics. 267 // graphics.
268 void StopNewContentRenderingTimeout(); 268 void StopNewContentRenderingTimeout();
269 269
270 // Notification that a new compositor frame has been generated following
271 // a page load. This stops |new_content_rendering_timeout_|.
Charlie Reis 2015/09/30 20:36:19 nit: "...or prevents the timer from running if it
kenrb 2015/09/30 21:25:02 Done.
272 void OnFirstPaintAfterLoad();
Charlie Reis 2015/09/30 20:36:19 Are we guaranteed to always get both this and the
kenrb 2015/09/30 21:25:02 It shouldn't be possible to get a ViewHostMsg_DidF
273
270 // Forwards the given message to the renderer. These are called by the view 274 // Forwards the given message to the renderer. These are called by the view
271 // when it has received a message. 275 // when it has received a message.
272 void ForwardGestureEventWithLatencyInfo( 276 void ForwardGestureEventWithLatencyInfo(
273 const blink::WebGestureEvent& gesture_event, 277 const blink::WebGestureEvent& gesture_event,
274 const ui::LatencyInfo& ui_latency); 278 const ui::LatencyInfo& ui_latency);
275 void ForwardTouchEventWithLatencyInfo( 279 void ForwardTouchEventWithLatencyInfo(
276 const blink::WebTouchEvent& touch_event, 280 const blink::WebTouchEvent& touch_event,
277 const ui::LatencyInfo& ui_latency); 281 const ui::LatencyInfo& ui_latency);
278 void ForwardMouseEventWithLatencyInfo( 282 void ForwardMouseEventWithLatencyInfo(
279 const blink::WebMouseEvent& mouse_event, 283 const blink::WebMouseEvent& mouse_event,
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 scoped_ptr<SyntheticGestureController> synthetic_gesture_controller_; 807 scoped_ptr<SyntheticGestureController> synthetic_gesture_controller_;
804 808
805 scoped_ptr<TouchEmulator> touch_emulator_; 809 scoped_ptr<TouchEmulator> touch_emulator_;
806 810
807 // Receives and handles all input events. 811 // Receives and handles all input events.
808 scoped_ptr<InputRouter> input_router_; 812 scoped_ptr<InputRouter> input_router_;
809 813
810 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_; 814 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_;
811 815
812 scoped_ptr<TimeoutMonitor> new_content_rendering_timeout_; 816 scoped_ptr<TimeoutMonitor> new_content_rendering_timeout_;
817 bool received_paint_after_load_;
Charlie Reis 2015/09/30 20:36:19 Let's say when we expect this to be true, since it
kenrb 2015/09/30 21:25:02 Done.
813 818
814 #if defined(OS_WIN) 819 #if defined(OS_WIN)
815 std::list<HWND> dummy_windows_for_activation_; 820 std::list<HWND> dummy_windows_for_activation_;
816 #endif 821 #endif
817 822
818 RenderWidgetHostLatencyTracker latency_tracker_; 823 RenderWidgetHostLatencyTracker latency_tracker_;
819 824
820 int next_browser_snapshot_id_; 825 int next_browser_snapshot_id_;
821 using PendingSnapshotMap = std::map<int, GetSnapshotFromBrowserCallback>; 826 using PendingSnapshotMap = std::map<int, GetSnapshotFromBrowserCallback>;
822 PendingSnapshotMap pending_browser_snapshots_; 827 PendingSnapshotMap pending_browser_snapshots_;
823 828
824 // Indicates whether a RenderFramehost has ownership, in which case this 829 // Indicates whether a RenderFramehost has ownership, in which case this
825 // object does not self destroy. 830 // object does not self destroy.
826 bool owned_by_render_frame_host_; 831 bool owned_by_render_frame_host_;
827 832
828 // Indicates whether this RenderWidgetHost thinks is focused. This is trying 833 // Indicates whether this RenderWidgetHost thinks is focused. This is trying
829 // to match what the renderer process knows. It is different from 834 // to match what the renderer process knows. It is different from
830 // RenderWidgetHostView::HasFocus in that in that the focus request may fail, 835 // RenderWidgetHostView::HasFocus in that in that the focus request may fail,
831 // causing HasFocus to return false when is_focused_ is true. 836 // causing HasFocus to return false when is_focused_ is true.
832 bool is_focused_; 837 bool is_focused_;
833 838
834 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 839 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
835 840
836 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 841 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
837 }; 842 };
838 843
839 } // namespace content 844 } // namespace content
840 845
841 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 846 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698