summaryrefslogtreecommitdiffstats
path: root/cc/test/scheduler_test_common.h
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-30 22:59:56 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-30 22:59:56 +0000
commite5e9c02081e6b37f49febeba87863a1dac598949 (patch)
tree3e2c4fcd2926cc064fd7937e3cdee49e9ef62fd6 /cc/test/scheduler_test_common.h
parent760d9886b9d56182f6c91944e06f250df6677d33 (diff)
downloadchromium_src-e5e9c02081e6b37f49febeba87863a1dac598949.zip
chromium_src-e5e9c02081e6b37f49febeba87863a1dac598949.tar.gz
chromium_src-e5e9c02081e6b37f49febeba87863a1dac598949.tar.bz2
Remove WebKit::Platform dependencies from cc
This removes all dependencies on the static WebKit::Platform pointer from cc. The biggest change is implementing cc::Thread on top of base::MessageLoopProxy instead of WebKit::WebThread. For the main thread cc::Thread simply binds to the current thread's MessageLoopProxy. For the impl thread, the bindings layer (specifically webkit/compositor_bindings/web_compositor_impl) extracts the MessageLoopProxy out of the passed in WebThread. BUG=144539 Review URL: https://codereview.chromium.org/11344004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165050 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/scheduler_test_common.h')
-rw-r--r--cc/test/scheduler_test_common.h20
1 files changed, 7 insertions, 13 deletions
diff --git a/cc/test/scheduler_test_common.h b/cc/test/scheduler_test_common.h
index a586150..e43e4b8 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;
};