| 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 #include "content/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <tuple> | 10 #include <tuple> |
| (...skipping 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1899 void RenderWidgetHostImpl::IncrementInFlightEventCount( | 1899 void RenderWidgetHostImpl::IncrementInFlightEventCount( |
| 1900 blink::WebInputEvent::Type event_type) { | 1900 blink::WebInputEvent::Type event_type) { |
| 1901 increment_in_flight_event_count(); | 1901 increment_in_flight_event_count(); |
| 1902 if (!is_hidden_) { | 1902 if (!is_hidden_) { |
| 1903 StartHangMonitorTimeout( | 1903 StartHangMonitorTimeout( |
| 1904 hung_renderer_delay_, event_type, | 1904 hung_renderer_delay_, event_type, |
| 1905 RendererUnresponsiveType::RENDERER_UNRESPONSIVE_IN_FLIGHT_EVENTS); | 1905 RendererUnresponsiveType::RENDERER_UNRESPONSIVE_IN_FLIGHT_EVENTS); |
| 1906 } | 1906 } |
| 1907 } | 1907 } |
| 1908 | 1908 |
| 1909 void RenderWidgetHostImpl::DecrementInFlightEventCount() { | 1909 void RenderWidgetHostImpl::DecrementInFlightEventCount( |
| 1910 InputEventAckSource ack_source) { |
| 1910 if (decrement_in_flight_event_count() <= 0) { | 1911 if (decrement_in_flight_event_count() <= 0) { |
| 1911 // Cancel pending hung renderer checks since the renderer is responsive. | 1912 // Cancel pending hung renderer checks since the renderer is responsive. |
| 1912 StopHangMonitorTimeout(); | 1913 StopHangMonitorTimeout(); |
| 1913 } else { | 1914 } else { |
| 1914 RestartHangMonitorTimeoutIfNecessary(); | 1915 // Only restart the hang monitor timer if we got a response from the |
| 1916 // main thread. |
| 1917 if (ack_source == InputEventAckSource::MAIN_THREAD) |
| 1918 RestartHangMonitorTimeoutIfNecessary(); |
| 1915 } | 1919 } |
| 1916 } | 1920 } |
| 1917 | 1921 |
| 1918 void RenderWidgetHostImpl::OnHasTouchEventHandlers(bool has_handlers) { | 1922 void RenderWidgetHostImpl::OnHasTouchEventHandlers(bool has_handlers) { |
| 1919 has_touch_handler_ = has_handlers; | 1923 has_touch_handler_ = has_handlers; |
| 1920 } | 1924 } |
| 1921 | 1925 |
| 1922 void RenderWidgetHostImpl::DidFlush() { | 1926 void RenderWidgetHostImpl::DidFlush() { |
| 1923 if (synthetic_gesture_controller_) | 1927 if (synthetic_gesture_controller_) |
| 1924 synthetic_gesture_controller_->OnDidFlushInput(); | 1928 synthetic_gesture_controller_->OnDidFlushInput(); |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2215 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; | 2219 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; |
| 2216 } | 2220 } |
| 2217 | 2221 |
| 2218 BrowserAccessibilityManager* | 2222 BrowserAccessibilityManager* |
| 2219 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { | 2223 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { |
| 2220 return delegate_ ? | 2224 return delegate_ ? |
| 2221 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; | 2225 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; |
| 2222 } | 2226 } |
| 2223 | 2227 |
| 2224 } // namespace content | 2228 } // namespace content |
| OLD | NEW |