| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/input/timeout_monitor.h" | 5 #include "content/browser/renderer_host/input/timeout_monitor.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/trace_event/trace_event.h" |
| 8 | 8 |
| 9 using base::TimeDelta; | 9 using base::TimeDelta; |
| 10 using base::TimeTicks; | 10 using base::TimeTicks; |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 |
| 14 TimeoutMonitor::TimeoutMonitor(const TimeoutHandler& timeout_handler) | 14 TimeoutMonitor::TimeoutMonitor(const TimeoutHandler& timeout_handler) |
| 15 : timeout_handler_(timeout_handler) { | 15 : timeout_handler_(timeout_handler) { |
| 16 DCHECK(!timeout_handler_.is_null()); | 16 DCHECK(!timeout_handler_.is_null()); |
| 17 } | 17 } |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 time_when_considered_timed_out_ = TimeTicks(); | 103 time_when_considered_timed_out_ = TimeTicks(); |
| 104 timeout_handler_.Run(); | 104 timeout_handler_.Run(); |
| 105 } | 105 } |
| 106 | 106 |
| 107 bool TimeoutMonitor::IsRunning() const { | 107 bool TimeoutMonitor::IsRunning() const { |
| 108 return timeout_timer_.IsRunning() && | 108 return timeout_timer_.IsRunning() && |
| 109 !time_when_considered_timed_out_.is_null(); | 109 !time_when_considered_timed_out_.is_null(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 } // namespace content | 112 } // namespace content |
| OLD | NEW |