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

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

Issue 2730203002: Revert of Discard compositor frames from unloaded web content (Closed)
Patch Set: 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 // left on the existing timeouts. 318 // left on the existing timeouts.
319 void StartHangMonitorTimeout(base::TimeDelta delay, 319 void StartHangMonitorTimeout(base::TimeDelta delay,
320 blink::WebInputEvent::Type event_type, 320 blink::WebInputEvent::Type event_type,
321 RendererUnresponsiveType hang_monitor_reason); 321 RendererUnresponsiveType hang_monitor_reason);
322 322
323 // Stops all existing hang monitor timeouts and assumes the renderer is 323 // Stops all existing hang monitor timeouts and assumes the renderer is
324 // responsive. 324 // responsive.
325 void StopHangMonitorTimeout(); 325 void StopHangMonitorTimeout();
326 326
327 // Starts the rendering timeout, which will clear displayed graphics if 327 // Starts the rendering timeout, which will clear displayed graphics if
328 // a new compositor frame is not received before it expires. This also causes 328 // a new compositor frame is not received before it expires.
329 // any new compositor frames received with content_source_id less than 329 void StartNewContentRenderingTimeout();
330 // |next_source_id| to be discarded.
331 void StartNewContentRenderingTimeout(uint32_t next_source_id);
332 330
333 // Notification that a new compositor frame has been generated following 331 // Notification that a new compositor frame has been generated following
334 // a page load. This stops |new_content_rendering_timeout_|, or prevents 332 // a page load. This stops |new_content_rendering_timeout_|, or prevents
335 // the timer from running if the load commit message hasn't been received 333 // the timer from running if the load commit message hasn't been received
336 // yet. 334 // yet.
337 void OnFirstPaintAfterLoad(); 335 void OnFirstPaintAfterLoad();
338 336
339 // Forwards the keyboard event with optional commands to the renderer. If 337 // Forwards the keyboard event with optional commands to the renderer. If
340 // |key_event| is not forwarded for any reason, then |commands| are ignored. 338 // |key_event| is not forwarded for any reason, then |commands| are ignored.
341 void ForwardKeyboardEventWithCommands( 339 void ForwardKeyboardEventWithCommands(
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 // Type of the last blocking event that started the hang monitor. 882 // Type of the last blocking event that started the hang monitor.
885 blink::WebInputEvent::Type hang_monitor_event_type_; 883 blink::WebInputEvent::Type hang_monitor_event_type_;
886 884
887 // Type of the last blocking event sent to the renderer. 885 // Type of the last blocking event sent to the renderer.
888 blink::WebInputEvent::Type last_event_type_; 886 blink::WebInputEvent::Type last_event_type_;
889 887
890 // This value indicates how long to wait for a new compositor frame from a 888 // This value indicates how long to wait for a new compositor frame from a
891 // renderer process before clearing any previously displayed content. 889 // renderer process before clearing any previously displayed content.
892 base::TimeDelta new_content_rendering_delay_; 890 base::TimeDelta new_content_rendering_delay_;
893 891
894 // This identifier tags compositor frames according to the page load with
895 // which they are associated, to prevent an unloaded web page from being
896 // drawn after a navigation to a new page has already committed. This is
897 // a no-op for non-top-level RenderWidgets, as that should always be zero.
898 // TODO(kenrb, fsamuel): We should use SurfaceIDs for this purpose when they
899 // are available in the renderer process. See https://crbug.com/695579.
900 uint32_t current_content_source_id_;
901
902 #if defined(OS_MACOSX) 892 #if defined(OS_MACOSX)
903 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_; 893 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_;
904 #endif 894 #endif
905 895
906 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 896 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
907 897
908 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 898 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
909 }; 899 };
910 900
911 } // namespace content 901 } // namespace content
912 902
913 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 903 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('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