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

Unified Diff: cc/test/scheduler_test_common.h

Issue 1200113003: cc: Cleanup DelayBasedTimeSource code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@task_runner_refptr
Patch Set: Fix race between missed tick and normal tick Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: cc/test/scheduler_test_common.h
diff --git a/cc/test/scheduler_test_common.h b/cc/test/scheduler_test_common.h
index c66b16261535a3183fcbbe5571cf52829856d7ac..3a34e07e0eb596abb9d296bd2a49d7b1cbc3b318 100644
--- a/cc/test/scheduler_test_common.h
+++ b/cc/test/scheduler_test_common.h
@@ -19,20 +19,21 @@ namespace cc {
class RenderingStatsInstrumentation;
-class FakeTimeSourceClient : public TimeSourceClient {
+class FakeDelayBasedTimeSourceClient : public DelayBasedTimeSourceClient {
public:
- FakeTimeSourceClient() : tick_called_(false) {}
+ FakeDelayBasedTimeSourceClient() : tick_called_(false) {}
void Reset() { tick_called_ = false; }
bool TickCalled() const { return tick_called_; }
- // TimeSourceClient implementation.
+ // DelayBasedTimeSourceClient implementation.
+ void OnMissedTick() override;
void OnTimerTick() override;
protected:
bool tick_called_;
private:
- DISALLOW_COPY_AND_ASSIGN(FakeTimeSourceClient);
+ DISALLOW_COPY_AND_ASSIGN(FakeDelayBasedTimeSourceClient);
};
class FakeDelayBasedTimeSource : public DelayBasedTimeSource {
@@ -150,11 +151,12 @@ class TestSyntheticBeginFrameSource : public SyntheticBeginFrameSource {
TestDelayBasedTimeSource::Create(now_src, initial_interval,
task_runner);
return make_scoped_ptr(
- new TestSyntheticBeginFrameSource(time_source.Pass()));
+ new TestSyntheticBeginFrameSource(task_runner, time_source.Pass()));
}
protected:
explicit TestSyntheticBeginFrameSource(
+ OrderedSimpleTaskRunner* task_runner,
scoped_ptr<DelayBasedTimeSource> time_source);
private:

Powered by Google App Engine
This is Rietveld 408576698