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

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

Issue 2770873002: Remove ViewHostMsg_DidFirstPaintAfterLoad (Closed)
Patch Set: Updated unit tests Created 3 years, 9 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 // Stops all existing hang monitor timeouts and assumes the renderer is 332 // Stops all existing hang monitor timeouts and assumes the renderer is
333 // responsive. 333 // responsive.
334 void StopHangMonitorTimeout(); 334 void StopHangMonitorTimeout();
335 335
336 // Starts the rendering timeout, which will clear displayed graphics if 336 // Starts the rendering timeout, which will clear displayed graphics if
337 // a new compositor frame is not received before it expires. This also causes 337 // a new compositor frame is not received before it expires. This also causes
338 // any new compositor frames received with content_source_id less than 338 // any new compositor frames received with content_source_id less than
339 // |next_source_id| to be discarded. 339 // |next_source_id| to be discarded.
340 void StartNewContentRenderingTimeout(uint32_t next_source_id); 340 void StartNewContentRenderingTimeout(uint32_t next_source_id);
341 341
342 // Notification that a new compositor frame has been generated following
343 // a page load. This stops |new_content_rendering_timeout_|, or prevents
344 // the timer from running if the load commit message hasn't been received
345 // yet.
346 void OnFirstPaintAfterLoad();
347
348 // Forwards the keyboard event with optional commands to the renderer. If 342 // Forwards the keyboard event with optional commands to the renderer. If
349 // |key_event| is not forwarded for any reason, then |commands| are ignored. 343 // |key_event| is not forwarded for any reason, then |commands| are ignored.
350 void ForwardKeyboardEventWithCommands( 344 void ForwardKeyboardEventWithCommands(
351 const NativeWebKeyboardEvent& key_event, 345 const NativeWebKeyboardEvent& key_event,
352 const std::vector<EditCommand>* commands); 346 const std::vector<EditCommand>* commands);
353 347
354 // Forwards the given message to the renderer. These are called by the view 348 // Forwards the given message to the renderer. These are called by the view
355 // when it has received a message. 349 // when it has received a message.
356 void ForwardGestureEventWithLatencyInfo( 350 void ForwardGestureEventWithLatencyInfo(
357 const blink::WebGestureEvent& gesture_event, 351 const blink::WebGestureEvent& gesture_event,
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 835
842 std::unique_ptr<TouchEmulator> touch_emulator_; 836 std::unique_ptr<TouchEmulator> touch_emulator_;
843 837
844 // Receives and handles all input events. 838 // Receives and handles all input events.
845 std::unique_ptr<InputRouter> input_router_; 839 std::unique_ptr<InputRouter> input_router_;
846 840
847 std::unique_ptr<TimeoutMonitor> hang_monitor_timeout_; 841 std::unique_ptr<TimeoutMonitor> hang_monitor_timeout_;
848 842
849 std::unique_ptr<TimeoutMonitor> new_content_rendering_timeout_; 843 std::unique_ptr<TimeoutMonitor> new_content_rendering_timeout_;
850 844
851 // This boolean is true if RenderWidgetHostImpl receives a compositor frame
852 // from a newly loaded page before StartNewContentRenderingTimeout() is
853 // called. This means that a paint for the new load has completed before
854 // the browser received a DidCommitProvisionalLoad message. In that case
855 // |new_content_rendering_timeout_| is not needed. The renderer will send
856 // both the FirstPaintAfterLoad and DidCommitProvisionalLoad messages after
857 // any new page navigation, it doesn't matter which is received first, and
858 // it should not be possible to interleave other navigations in between
859 // receipt of those messages (unless FirstPaintAfterLoad is prevented from
860 // being sent, in which case the timer should fire).
861 bool received_paint_after_load_;
862
863 RenderWidgetHostLatencyTracker latency_tracker_; 845 RenderWidgetHostLatencyTracker latency_tracker_;
864 846
865 int next_browser_snapshot_id_; 847 int next_browser_snapshot_id_;
866 using PendingSnapshotMap = std::map<int, GetSnapshotFromBrowserCallback>; 848 using PendingSnapshotMap = std::map<int, GetSnapshotFromBrowserCallback>;
867 PendingSnapshotMap pending_browser_snapshots_; 849 PendingSnapshotMap pending_browser_snapshots_;
868 PendingSnapshotMap pending_surface_browser_snapshots_; 850 PendingSnapshotMap pending_surface_browser_snapshots_;
869 851
870 // Indicates whether a RenderFramehost has ownership, in which case this 852 // Indicates whether a RenderFramehost has ownership, in which case this
871 // object does not self destroy. 853 // object does not self destroy.
872 bool owned_by_render_frame_host_; 854 bool owned_by_render_frame_host_;
(...skipping 30 matching lines...) Expand all
903 // are available in the renderer process. See https://crbug.com/695579. 885 // are available in the renderer process. See https://crbug.com/695579.
904 uint32_t current_content_source_id_; 886 uint32_t current_content_source_id_;
905 887
906 #if defined(OS_MACOSX) 888 #if defined(OS_MACOSX)
907 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_; 889 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_;
908 #endif 890 #endif
909 891
910 cc::LocalSurfaceId last_local_surface_id_; 892 cc::LocalSurfaceId last_local_surface_id_;
911 gfx::Size last_frame_size_; 893 gfx::Size last_frame_size_;
912 float last_device_scale_factor_; 894 float last_device_scale_factor_;
895 uint32_t last_received_content_source_id_ = 0;
Charlie Reis 2017/03/24 16:52:01 Can you add a comment here about it, or point to w
Saman Sami 2017/03/24 18:04:50 Done.
913 896
914 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 897 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
915 898
916 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 899 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
917 }; 900 };
918 901
919 } // namespace content 902 } // namespace content
920 903
921 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 904 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | content/renderer/render_frame_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698