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

Unified Diff: cc/test/CCSchedulerTestCommon.h

Issue 10947047: Fix remaining cc files to compile with Clang (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix FakeCCDelayBasedTimeSource Created 8 years, 3 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
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/test/CCSchedulerTestCommon.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/CCSchedulerTestCommon.h
diff --git a/cc/test/CCSchedulerTestCommon.h b/cc/test/CCSchedulerTestCommon.h
index 770d41e50182e245e43f9c9a8a7a473cbf7fa9e7..1eb3b02135e073ef8b53a70e54d22b6d9ea2b7df 100644
--- a/cc/test/CCSchedulerTestCommon.h
+++ b/cc/test/CCSchedulerTestCommon.h
@@ -20,7 +20,7 @@ public:
void reset() { m_tickCalled = false; }
bool tickCalled() const { return m_tickCalled; }
- virtual void onTimerTick() OVERRIDE { m_tickCalled = true; }
+ virtual void onTimerTick() OVERRIDE;
protected:
bool m_tickCalled;
@@ -28,7 +28,9 @@ protected:
class FakeCCThread : public cc::CCThread {
public:
- FakeCCThread() { reset(); }
+ FakeCCThread();
+ virtual ~FakeCCThread();
+
void reset()
{
m_pendingTaskDelay = 0;
@@ -55,17 +57,9 @@ public:
return m_pendingTaskDelay;
}
- virtual void postTask(PassOwnPtr<Task>) { ASSERT_NOT_REACHED(); }
- virtual void postDelayedTask(PassOwnPtr<Task> task, long long delay)
- {
- if (m_runPendingTaskOnOverwrite && hasPendingTask())
- runPendingTask();
-
- EXPECT_TRUE(!hasPendingTask());
- m_pendingTask = task;
- m_pendingTaskDelay = delay;
- }
- virtual base::PlatformThreadId threadID() const { return 0; }
+ virtual void postTask(PassOwnPtr<Task>) OVERRIDE;
+ virtual void postDelayedTask(PassOwnPtr<Task> task, long long delay) OVERRIDE;
+ virtual base::PlatformThreadId threadID() const OVERRIDE;
protected:
OwnPtr<Task> m_pendingTask;
@@ -84,12 +78,12 @@ public:
virtual ~FakeCCTimeSource() { }
- virtual void setClient(cc::CCTimeSourceClient* client) OVERRIDE { m_client = client; }
- virtual void setActive(bool b) OVERRIDE { m_active = b; }
- virtual bool active() const OVERRIDE { return m_active; }
+ virtual void setClient(cc::CCTimeSourceClient* client) OVERRIDE;
+ virtual void setActive(bool b) OVERRIDE;
+ virtual bool active() const OVERRIDE;
virtual void setTimebaseAndInterval(base::TimeTicks timebase, base::TimeDelta interval) OVERRIDE { }
- virtual base::TimeTicks lastTickTime() OVERRIDE { return base::TimeTicks(); }
- virtual base::TimeTicks nextTickTimeIfActivated() OVERRIDE { return base::TimeTicks(); }
+ virtual base::TimeTicks lastTickTime() OVERRIDE;
+ virtual base::TimeTicks nextTickTimeIfActivated() OVERRIDE;
void tick()
{
@@ -114,7 +108,7 @@ public:
}
void setNow(base::TimeTicks time) { m_now = time; }
- virtual base::TimeTicks now() const OVERRIDE { return m_now; }
+ virtual base::TimeTicks now() const OVERRIDE;
protected:
FakeCCDelayBasedTimeSource(base::TimeDelta interval, cc::CCThread* thread)
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/test/CCSchedulerTestCommon.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698