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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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. | 328 // a new compositor frame is not received before it expires. This also causes |
329 void StartNewContentRenderingTimeout(); | 329 // any new compositor frames received with content_source_id less than |
| 330 // |next_source_id| to be discarded. |
| 331 void StartNewContentRenderingTimeout(uint32_t next_source_id); |
330 | 332 |
331 // Notification that a new compositor frame has been generated following | 333 // Notification that a new compositor frame has been generated following |
332 // a page load. This stops |new_content_rendering_timeout_|, or prevents | 334 // a page load. This stops |new_content_rendering_timeout_|, or prevents |
333 // the timer from running if the load commit message hasn't been received | 335 // the timer from running if the load commit message hasn't been received |
334 // yet. | 336 // yet. |
335 void OnFirstPaintAfterLoad(); | 337 void OnFirstPaintAfterLoad(); |
336 | 338 |
337 // Forwards the keyboard event with optional commands to the renderer. If | 339 // Forwards the keyboard event with optional commands to the renderer. If |
338 // |key_event| is not forwarded for any reason, then |commands| are ignored. | 340 // |key_event| is not forwarded for any reason, then |commands| are ignored. |
339 void ForwardKeyboardEventWithCommands( | 341 void ForwardKeyboardEventWithCommands( |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 // Type of the last blocking event that started the hang monitor. | 884 // Type of the last blocking event that started the hang monitor. |
883 blink::WebInputEvent::Type hang_monitor_event_type_; | 885 blink::WebInputEvent::Type hang_monitor_event_type_; |
884 | 886 |
885 // Type of the last blocking event sent to the renderer. | 887 // Type of the last blocking event sent to the renderer. |
886 blink::WebInputEvent::Type last_event_type_; | 888 blink::WebInputEvent::Type last_event_type_; |
887 | 889 |
888 // This value indicates how long to wait for a new compositor frame from a | 890 // This value indicates how long to wait for a new compositor frame from a |
889 // renderer process before clearing any previously displayed content. | 891 // renderer process before clearing any previously displayed content. |
890 base::TimeDelta new_content_rendering_delay_; | 892 base::TimeDelta new_content_rendering_delay_; |
891 | 893 |
| 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 |
892 #if defined(OS_MACOSX) | 902 #if defined(OS_MACOSX) |
893 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_; | 903 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_; |
894 #endif | 904 #endif |
895 | 905 |
896 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 906 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
897 | 907 |
898 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 908 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
899 }; | 909 }; |
900 | 910 |
901 } // namespace content | 911 } // namespace content |
902 | 912 |
903 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 913 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |