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

Unified Diff: cc/test/scheduler_test_common.h

Issue 11344004: Remove WebKit::Platform dependencies from cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix webkit_compositor_bindings_unittests Created 8 years, 2 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/run_all_unittests.cc ('k') | cc/test/scheduler_test_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/scheduler_test_common.h
diff --git a/cc/test/scheduler_test_common.h b/cc/test/scheduler_test_common.h
index a58615042e0adc98783a85bdd740a2747eebe3e2..e43e4b81fd86fd2e8dd25d0cb400f1b90d88b9a3 100644
--- a/cc/test/scheduler_test_common.h
+++ b/cc/test/scheduler_test_common.h
@@ -5,12 +5,11 @@
#ifndef CCSchedulerTestCommon_h
#define CCSchedulerTestCommon_h
-#include "base/threading/platform_thread.h"
+#include "base/memory/scoped_ptr.h"
#include "cc/delay_based_time_source.h"
#include "cc/frame_rate_controller.h"
#include "cc/thread.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include <wtf/OwnPtr.h>
namespace WebKitTests {
@@ -34,7 +33,7 @@ public:
void reset()
{
m_pendingTaskDelay = 0;
- m_pendingTask.clear();
+ m_pendingTask.reset();
m_runPendingTaskOnOverwrite = false;
}
@@ -44,12 +43,7 @@ public:
}
bool hasPendingTask() const { return m_pendingTask; }
- void runPendingTask()
- {
- ASSERT_TRUE(m_pendingTask);
- OwnPtr<Task> task = m_pendingTask.release();
- task->performTask();
- }
+ void runPendingTask();
long long pendingDelayMs() const
{
@@ -57,12 +51,12 @@ public:
return m_pendingTaskDelay;
}
- virtual void postTask(PassOwnPtr<Task>) OVERRIDE;
- virtual void postDelayedTask(PassOwnPtr<Task> task, long long delay) OVERRIDE;
- virtual base::PlatformThreadId threadID() const OVERRIDE;
+ virtual void postTask(base::Closure cb) OVERRIDE;
+ virtual void postDelayedTask(base::Closure cb, long long delay) OVERRIDE;
+ virtual bool belongsToCurrentThread() const OVERRIDE;
protected:
- OwnPtr<Task> m_pendingTask;
+ scoped_ptr<base::Closure> m_pendingTask;
long long m_pendingTaskDelay;
bool m_runPendingTaskOnOverwrite;
};
« no previous file with comments | « cc/test/run_all_unittests.cc ('k') | cc/test/scheduler_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698