| 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 310 |
| 311 // GPU accelerated version of GetBackingStore function. This will | 311 // GPU accelerated version of GetBackingStore function. This will |
| 312 // trigger a re-composite to the view. It may fail if a resize is pending, or | 312 // trigger a re-composite to the view. It may fail if a resize is pending, or |
| 313 // if a composite has already been requested and not acked yet. | 313 // if a composite has already been requested and not acked yet. |
| 314 bool ScheduleComposite(); | 314 bool ScheduleComposite(); |
| 315 | 315 |
| 316 // Starts a hang monitor timeout. If there's already a hang monitor timeout | 316 // Starts a hang monitor timeout. If there's already a hang monitor timeout |
| 317 // the new one will only fire if it has a shorter delay than the time | 317 // the new one will only fire if it has a shorter delay than the time |
| 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); | |
| 322 | 321 |
| 323 // Stops all existing hang monitor timeouts and assumes the renderer is | 322 // Stops all existing hang monitor timeouts and assumes the renderer is |
| 324 // responsive. | 323 // responsive. |
| 325 void StopHangMonitorTimeout(); | 324 void StopHangMonitorTimeout(); |
| 326 | 325 |
| 327 // Starts the rendering timeout, which will clear displayed graphics if | 326 // Starts the rendering timeout, which will clear displayed graphics if |
| 328 // a new compositor frame is not received before it expires. This also causes | 327 // a new compositor frame is not received before it expires. This also causes |
| 329 // any new compositor frames received with content_source_id less than | 328 // any new compositor frames received with content_source_id less than |
| 330 // |next_source_id| to be discarded. | 329 // |next_source_id| to be discarded. |
| 331 void StartNewContentRenderingTimeout(uint32_t next_source_id); | 330 void StartNewContentRenderingTimeout(uint32_t next_source_id); |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 bool is_focused_; | 869 bool is_focused_; |
| 871 | 870 |
| 872 // Whether the view should send begin frame messages to its render widget. | 871 // Whether the view should send begin frame messages to its render widget. |
| 873 // This is state that may arrive before the view has been set and that must be | 872 // This is state that may arrive before the view has been set and that must be |
| 874 // consistent with the state in the renderer, so this host handles it. | 873 // consistent with the state in the renderer, so this host handles it. |
| 875 bool needs_begin_frames_ = false; | 874 bool needs_begin_frames_ = false; |
| 876 | 875 |
| 877 // This value indicates how long to wait before we consider a renderer hung. | 876 // This value indicates how long to wait before we consider a renderer hung. |
| 878 base::TimeDelta hung_renderer_delay_; | 877 base::TimeDelta hung_renderer_delay_; |
| 879 | 878 |
| 880 // Stores the reason the hang_monitor_timeout_ has been started. Used to | |
| 881 // report histograms if the renderer is hung. | |
| 882 RendererUnresponsiveType hang_monitor_reason_; | |
| 883 | |
| 884 // Type of the last blocking event that started the hang monitor. | 879 // Type of the last blocking event that started the hang monitor. |
| 885 blink::WebInputEvent::Type hang_monitor_event_type_; | 880 blink::WebInputEvent::Type hang_monitor_event_type_; |
| 886 | 881 |
| 887 // Type of the last blocking event sent to the renderer. | 882 // Type of the last blocking event sent to the renderer. |
| 888 blink::WebInputEvent::Type last_event_type_; | 883 blink::WebInputEvent::Type last_event_type_; |
| 889 | 884 |
| 890 // This value indicates how long to wait for a new compositor frame from a | 885 // This value indicates how long to wait for a new compositor frame from a |
| 891 // renderer process before clearing any previously displayed content. | 886 // renderer process before clearing any previously displayed content. |
| 892 base::TimeDelta new_content_rendering_delay_; | 887 base::TimeDelta new_content_rendering_delay_; |
| 893 | 888 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 904 #endif | 899 #endif |
| 905 | 900 |
| 906 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 901 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
| 907 | 902 |
| 908 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 903 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
| 909 }; | 904 }; |
| 910 | 905 |
| 911 } // namespace content | 906 } // namespace content |
| 912 | 907 |
| 913 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 908 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| OLD | NEW |