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

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

Issue 535653002: Extend the hang monitor timeout when an event ack is received. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1772 } 1772 }
1773 1773
1774 void RenderWidgetHostImpl::IncrementInFlightEventCount() { 1774 void RenderWidgetHostImpl::IncrementInFlightEventCount() {
1775 StartHangMonitorTimeout( 1775 StartHangMonitorTimeout(
1776 TimeDelta::FromMilliseconds(hung_renderer_delay_ms_)); 1776 TimeDelta::FromMilliseconds(hung_renderer_delay_ms_));
1777 increment_in_flight_event_count(); 1777 increment_in_flight_event_count();
1778 } 1778 }
1779 1779
1780 void RenderWidgetHostImpl::DecrementInFlightEventCount() { 1780 void RenderWidgetHostImpl::DecrementInFlightEventCount() {
1781 DCHECK_GE(in_flight_event_count_, 0); 1781 DCHECK_GE(in_flight_event_count_, 0);
1782 // Cancel pending hung renderer checks since the renderer is responsive. 1782 if (decrement_in_flight_event_count() <= 0) {
1783 if (decrement_in_flight_event_count() <= 0) 1783 // Cancel pending hung renderer checks since the renderer is responsive.
1784 StopHangMonitorTimeout(); 1784 StopHangMonitorTimeout();
1785 } else {
1786 // The renderer is responsive, but there are in-flight events to wait for.
1787 RestartHangMonitorTimeout();
1788 }
1785 } 1789 }
1786 1790
1787 void RenderWidgetHostImpl::OnHasTouchEventHandlers(bool has_handlers) { 1791 void RenderWidgetHostImpl::OnHasTouchEventHandlers(bool has_handlers) {
1788 has_touch_handler_ = has_handlers; 1792 has_touch_handler_ = has_handlers;
1789 } 1793 }
1790 1794
1791 void RenderWidgetHostImpl::DidFlush() { 1795 void RenderWidgetHostImpl::DidFlush() {
1792 if (synthetic_gesture_controller_) 1796 if (synthetic_gesture_controller_)
1793 synthetic_gesture_controller_->OnDidFlushInput(); 1797 synthetic_gesture_controller_->OnDidFlushInput();
1794 if (view_) 1798 if (view_)
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
2311 } 2315 }
2312 #endif 2316 #endif
2313 2317
2314 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { 2318 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() {
2315 if (view_) 2319 if (view_)
2316 return view_->PreferredReadbackFormat(); 2320 return view_->PreferredReadbackFormat();
2317 return kN32_SkColorType; 2321 return kN32_SkColorType;
2318 } 2322 }
2319 2323
2320 } // namespace content 2324 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698