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 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2018 } | 2018 } |
2019 | 2019 |
2020 void RenderWidgetHostImpl::DecrementInFlightEventCount() { | 2020 void RenderWidgetHostImpl::DecrementInFlightEventCount() { |
2021 DCHECK(in_flight_event_count_ >= 0); | 2021 DCHECK(in_flight_event_count_ >= 0); |
2022 // Cancel pending hung renderer checks since the renderer is responsive. | 2022 // Cancel pending hung renderer checks since the renderer is responsive. |
2023 if (decrement_in_flight_event_count() <= 0) | 2023 if (decrement_in_flight_event_count() <= 0) |
2024 StopHangMonitorTimeout(); | 2024 StopHangMonitorTimeout(); |
2025 } | 2025 } |
2026 | 2026 |
2027 void RenderWidgetHostImpl::OnHasTouchEventHandlers(bool has_handlers) { | 2027 void RenderWidgetHostImpl::OnHasTouchEventHandlers(bool has_handlers) { |
2028 if (has_touch_handler_ == has_handlers) | |
2029 return; | |
2030 has_touch_handler_ = has_handlers; | 2028 has_touch_handler_ = has_handlers; |
2031 #if defined(OS_ANDROID) | |
2032 if (view_) | |
2033 view_->HasTouchEventHandlers(has_touch_handler_); | |
2034 #endif | |
2035 } | 2029 } |
2036 | 2030 |
2037 OverscrollController* RenderWidgetHostImpl::GetOverscrollController() const { | 2031 OverscrollController* RenderWidgetHostImpl::GetOverscrollController() const { |
2038 return overscroll_controller_.get(); | 2032 return overscroll_controller_.get(); |
2039 } | 2033 } |
2040 | 2034 |
2041 void RenderWidgetHostImpl::DidFlush() { | 2035 void RenderWidgetHostImpl::DidFlush() { |
2042 if (view_) | 2036 if (view_) |
2043 view_->OnDidFlushInput(); | 2037 view_->OnDidFlushInput(); |
2044 } | 2038 } |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2551 } | 2545 } |
2552 } | 2546 } |
2553 | 2547 |
2554 // Add newly generated components into the latency info | 2548 // Add newly generated components into the latency info |
2555 for (lc = new_components.begin(); lc != new_components.end(); ++lc) { | 2549 for (lc = new_components.begin(); lc != new_components.end(); ++lc) { |
2556 latency_info->latency_components[lc->first] = lc->second; | 2550 latency_info->latency_components[lc->first] = lc->second; |
2557 } | 2551 } |
2558 } | 2552 } |
2559 | 2553 |
2560 } // namespace content | 2554 } // namespace content |
OLD | NEW |