| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 "media/capture/content/smooth_event_sampler.h" | 5 #include "device/capture/content/smooth_event_sampler.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| 11 #include "base/trace_event/trace_event.h" | 11 #include "base/trace_event/trace_event.h" |
| 12 | 12 |
| 13 namespace media { | 13 namespace media { |
| 14 | 14 |
| 15 SmoothEventSampler::SmoothEventSampler(base::TimeDelta min_capture_period) | 15 SmoothEventSampler::SmoothEventSampler(base::TimeDelta min_capture_period) |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 if (HasUnrecordedEvent()) | 59 if (HasUnrecordedEvent()) |
| 60 last_sample_ = current_event_; | 60 last_sample_ = current_event_; |
| 61 } | 61 } |
| 62 | 62 |
| 63 bool SmoothEventSampler::HasUnrecordedEvent() const { | 63 bool SmoothEventSampler::HasUnrecordedEvent() const { |
| 64 return !current_event_.is_null() && current_event_ != last_sample_; | 64 return !current_event_.is_null() && current_event_ != last_sample_; |
| 65 } | 65 } |
| 66 | 66 |
| 67 } // namespace media | 67 } // namespace media |
| OLD | NEW |