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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 bool is_focused_; | 861 bool is_focused_; |
863 | 862 |
864 // Whether the view should send begin frame messages to its render widget. | 863 // Whether the view should send begin frame messages to its render widget. |
865 // This is state that may arrive before the view has been set and that must be | 864 // This is state that may arrive before the view has been set and that must be |
866 // consistent with the state in the renderer, so this host handles it. | 865 // consistent with the state in the renderer, so this host handles it. |
867 bool needs_begin_frames_ = false; | 866 bool needs_begin_frames_ = false; |
868 | 867 |
869 // This value indicates how long to wait before we consider a renderer hung. | 868 // This value indicates how long to wait before we consider a renderer hung. |
870 base::TimeDelta hung_renderer_delay_; | 869 base::TimeDelta hung_renderer_delay_; |
871 | 870 |
872 // Stores the reason the hang_monitor_timeout_ has been started. Used to | |
873 // report histograms if the renderer is hung. | |
874 RendererUnresponsiveType hang_monitor_reason_; | |
875 | |
876 // Type of the last blocking event that started the hang monitor. | 871 // Type of the last blocking event that started the hang monitor. |
877 blink::WebInputEvent::Type hang_monitor_event_type_; | 872 blink::WebInputEvent::Type hang_monitor_event_type_; |
878 | 873 |
879 // Type of the last blocking event sent to the renderer. | 874 // Type of the last blocking event sent to the renderer. |
880 blink::WebInputEvent::Type last_event_type_; | 875 blink::WebInputEvent::Type last_event_type_; |
881 | 876 |
882 // This value indicates how long to wait for a new compositor frame from a | 877 // This value indicates how long to wait for a new compositor frame from a |
883 // renderer process before clearing any previously displayed content. | 878 // renderer process before clearing any previously displayed content. |
884 base::TimeDelta new_content_rendering_delay_; | 879 base::TimeDelta new_content_rendering_delay_; |
885 | 880 |
(...skipping 10 matching lines...) Expand all Loading... |
896 #endif | 891 #endif |
897 | 892 |
898 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 893 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
899 | 894 |
900 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 895 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
901 }; | 896 }; |
902 | 897 |
903 } // namespace content | 898 } // namespace content |
904 | 899 |
905 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 900 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |