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 2088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2099 delegate_->OnUserInteraction(this, event.type()); | 2099 delegate_->OnUserInteraction(this, event.type()); |
2100 } | 2100 } |
2101 } | 2101 } |
2102 | 2102 |
2103 return view_ ? view_->FilterInputEvent(event) | 2103 return view_ ? view_->FilterInputEvent(event) |
2104 : INPUT_EVENT_ACK_STATE_NOT_CONSUMED; | 2104 : INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
2105 } | 2105 } |
2106 | 2106 |
2107 void RenderWidgetHostImpl::IncrementInFlightEventCount( | 2107 void RenderWidgetHostImpl::IncrementInFlightEventCount( |
2108 blink::WebInputEvent::Type event_type) { | 2108 blink::WebInputEvent::Type event_type) { |
2109 increment_in_flight_event_count(); | 2109 ++in_flight_event_count_; |
2110 if (!is_hidden_) | 2110 if (!is_hidden_) |
2111 StartHangMonitorTimeout(hung_renderer_delay_, event_type); | 2111 StartHangMonitorTimeout(hung_renderer_delay_, event_type); |
2112 } | 2112 } |
2113 | 2113 |
2114 void RenderWidgetHostImpl::DecrementInFlightEventCount( | 2114 void RenderWidgetHostImpl::DecrementInFlightEventCount( |
2115 InputEventAckSource ack_source) { | 2115 InputEventAckSource ack_source) { |
2116 if (decrement_in_flight_event_count() <= 0) { | 2116 --in_flight_event_count_; |
| 2117 if (in_flight_event_count_ <= 0) { |
2117 // Cancel pending hung renderer checks since the renderer is responsive. | 2118 // Cancel pending hung renderer checks since the renderer is responsive. |
2118 StopHangMonitorTimeout(); | 2119 StopHangMonitorTimeout(); |
2119 } else { | 2120 } else { |
2120 // Only restart the hang monitor timer if we got a response from the | 2121 // Only restart the hang monitor timer if we got a response from the |
2121 // main thread. | 2122 // main thread. |
2122 if (ack_source == InputEventAckSource::MAIN_THREAD) | 2123 if (ack_source == InputEventAckSource::MAIN_THREAD) |
2123 RestartHangMonitorTimeoutIfNecessary(); | 2124 RestartHangMonitorTimeoutIfNecessary(); |
2124 } | 2125 } |
2125 } | 2126 } |
2126 | 2127 |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2547 // different from the receiver's. | 2548 // different from the receiver's. |
2548 file_system_file.url = | 2549 file_system_file.url = |
2549 GURL(storage::GetIsolatedFileSystemRootURIString( | 2550 GURL(storage::GetIsolatedFileSystemRootURIString( |
2550 file_system_url.origin(), filesystem_id, std::string()) | 2551 file_system_url.origin(), filesystem_id, std::string()) |
2551 .append(register_name)); | 2552 .append(register_name)); |
2552 file_system_file.filesystem_id = filesystem_id; | 2553 file_system_file.filesystem_id = filesystem_id; |
2553 } | 2554 } |
2554 } | 2555 } |
2555 | 2556 |
2556 } // namespace content | 2557 } // namespace content |
OLD | NEW |