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

Unified Diff: cc/test/fake_impl_task_runner_provider.h

Issue 1411663002: cc: Split Proxy to eliminate unnecessary dependencies on the impl side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update perf tests. Created 5 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/fake_impl_proxy.h ('k') | cc/test/fake_layer_tree_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_impl_task_runner_provider.h
diff --git a/cc/test/fake_impl_task_runner_provider.h b/cc/test/fake_impl_task_runner_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..49ddcaadb258c74dd95b70d887516f1af1df9594
--- /dev/null
+++ b/cc/test/fake_impl_task_runner_provider.h
@@ -0,0 +1,35 @@
+// Copyright 2015 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.
+
+#ifndef CC_TEST_FAKE_IMPL_TASK_RUNNER_PROVIDER_H_
+#define CC_TEST_FAKE_IMPL_TASK_RUNNER_PROVIDER_H_
+
+#include "base/thread_task_runner_handle.h"
+#include "cc/trees/single_thread_proxy.h"
+#include "cc/trees/task_runner_provider.h"
+
+namespace base {
+class SingleThreadIdleTaskRunner;
+}
+
+namespace cc {
+
+class FakeImplTaskRunnerProvider : public TaskRunnerProvider {
+ public:
+ FakeImplTaskRunnerProvider()
+ : TaskRunnerProvider(base::ThreadTaskRunnerHandle::Get(), nullptr),
+ set_impl_thread_(this) {}
+
+ explicit FakeImplTaskRunnerProvider(
+ scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner)
+ : TaskRunnerProvider(base::ThreadTaskRunnerHandle::Get(),
+ impl_task_runner),
+ set_impl_thread_(this) {}
+
+ private:
+ DebugScopedSetImplThread set_impl_thread_;
+};
+
+} // namespace cc
+#endif // CC_TEST_FAKE_IMPL_TASK_RUNNER_PROVIDER_H_
« no previous file with comments | « cc/test/fake_impl_proxy.h ('k') | cc/test/fake_layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698