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

Unified Diff: cc/trees/task_runner_provider.h

Issue 1419283002: cc: Split Proxy and TaskRunnerProvider for the LayerTreeHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 1 month 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/trees/single_thread_proxy.cc ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/task_runner_provider.h
diff --git a/cc/trees/task_runner_provider.h b/cc/trees/task_runner_provider.h
index 884a2426bbb0d8725e607230c5335487988626d6..38ca31f01193c776be7701a1044ae76b39bdd5d1 100644
--- a/cc/trees/task_runner_provider.h
+++ b/cc/trees/task_runner_provider.h
@@ -11,6 +11,7 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/single_thread_task_runner.h"
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
#include "base/values.h"
@@ -30,6 +31,13 @@ class BlockingTaskRunner;
// Useful for assertion checks.
class CC_EXPORT TaskRunnerProvider {
public:
+ static scoped_ptr<TaskRunnerProvider> Create(
+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) {
+ return make_scoped_ptr(
+ new TaskRunnerProvider(main_task_runner, impl_task_runner));
+ }
+
base::SingleThreadTaskRunner* MainThreadTaskRunner() const;
bool HasImplThread() const;
base::SingleThreadTaskRunner* ImplThreadTaskRunner() const;
@@ -49,11 +57,11 @@ class CC_EXPORT TaskRunnerProvider {
return blocking_main_thread_task_runner_.get();
}
+ protected:
TaskRunnerProvider(
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
- protected:
friend class DebugScopedSetImplThread;
friend class DebugScopedSetMainThread;
friend class DebugScopedSetMainThreadBlocked;
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698