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

Side by Side Diff: cc/trees/task_runner_provider.h

Issue 2158973002: cc: Clean up LayerTreeTest and TestHooks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: proxy-impls: test Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | cc/trees/threaded_channel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TREES_TASK_RUNNER_PROVIDER_H_ 5 #ifndef CC_TREES_TASK_RUNNER_PROVIDER_H_
6 #define CC_TREES_TASK_RUNNER_PROVIDER_H_ 6 #define CC_TREES_TASK_RUNNER_PROVIDER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 21 matching lines...) Expand all
32 // Useful for assertion checks. 32 // Useful for assertion checks.
33 class CC_EXPORT TaskRunnerProvider { 33 class CC_EXPORT TaskRunnerProvider {
34 public: 34 public:
35 static std::unique_ptr<TaskRunnerProvider> Create( 35 static std::unique_ptr<TaskRunnerProvider> Create(
36 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 36 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
37 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) { 37 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) {
38 return base::WrapUnique( 38 return base::WrapUnique(
39 new TaskRunnerProvider(main_task_runner, impl_task_runner)); 39 new TaskRunnerProvider(main_task_runner, impl_task_runner));
40 } 40 }
41 41
42 // TODO(vmpstr): Should these return scoped_refptr to task runners? Many
43 // places turn them into scoped_refptrs. How many of them need to?
42 base::SingleThreadTaskRunner* MainThreadTaskRunner() const; 44 base::SingleThreadTaskRunner* MainThreadTaskRunner() const;
43 bool HasImplThread() const; 45 bool HasImplThread() const;
44 base::SingleThreadTaskRunner* ImplThreadTaskRunner() const; 46 base::SingleThreadTaskRunner* ImplThreadTaskRunner() const;
45 47
46 // Debug hooks. 48 // Debug hooks.
47 bool IsMainThread() const; 49 bool IsMainThread() const;
48 bool IsImplThread() const; 50 bool IsImplThread() const;
49 bool IsMainThreadBlocked() const; 51 bool IsMainThreadBlocked() const;
50 #if DCHECK_IS_ON() 52 #if DCHECK_IS_ON()
51 void SetMainThreadBlocked(bool is_main_thread_blocked); 53 void SetMainThreadBlocked(bool is_main_thread_blocked);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 ~DebugScopedSetMainThreadBlocked() {} 109 ~DebugScopedSetMainThreadBlocked() {}
108 110
109 private: 111 private:
110 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThreadBlocked); 112 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThreadBlocked);
111 }; 113 };
112 #endif 114 #endif
113 115
114 } // namespace cc 116 } // namespace cc
115 117
116 #endif // CC_TREES_TASK_RUNNER_PROVIDER_H_ 118 #endif // CC_TREES_TASK_RUNNER_PROVIDER_H_
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | cc/trees/threaded_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698