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

Unified Diff: cc/test/CCSchedulerTestCommon.cpp

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/test/CCSchedulerTestCommon.h ('k') | cc/test/CCTiledLayerTestCommon.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/CCSchedulerTestCommon.cpp
diff --git a/cc/test/CCSchedulerTestCommon.cpp b/cc/test/CCSchedulerTestCommon.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e4f2a6ce5dbaa3f25cf9aa549d32cb56d509cc27
--- /dev/null
+++ b/cc/test/CCSchedulerTestCommon.cpp
@@ -0,0 +1,75 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+
+#include "CCSchedulerTestCommon.h"
+
+namespace WebKitTests {
+
+void FakeCCTimeSourceClient::onTimerTick()
+{
+ m_tickCalled = true;
+}
+
+FakeCCThread::FakeCCThread()
+{
+ reset();
+}
+
+FakeCCThread::~FakeCCThread()
+{
+}
+
+void FakeCCThread::postTask(PassOwnPtr<Task>)
+{
+ ASSERT_NOT_REACHED();
+}
+
+void FakeCCThread::postDelayedTask(PassOwnPtr<Task> task, long long delay)
+{
+ if (m_runPendingTaskOnOverwrite && hasPendingTask())
+ runPendingTask();
+
+ EXPECT_TRUE(!hasPendingTask());
+ m_pendingTask = task;
+ m_pendingTaskDelay = delay;
+}
+
+base::PlatformThreadId FakeCCThread::threadID() const
+{
+ return 0;
+}
+
+void FakeCCTimeSource::setClient(cc::CCTimeSourceClient* client)
+{
+ m_client = client;
+}
+
+void FakeCCTimeSource::setActive(bool b)
+{
+ m_active = b;
+}
+
+bool FakeCCTimeSource::active() const
+{
+ return m_active;
+}
+
+base::TimeTicks FakeCCTimeSource::lastTickTime()
+{
+ return base::TimeTicks();
+}
+
+base::TimeTicks FakeCCTimeSource::nextTickTimeIfActivated()
+{
+ return base::TimeTicks();
+}
+
+base::TimeTicks FakeCCDelayBasedTimeSource::now() const
+{
+ return m_now;
+}
+
+}
« no previous file with comments | « cc/test/CCSchedulerTestCommon.h ('k') | cc/test/CCTiledLayerTestCommon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698