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

Unified Diff: cc/trees/single_thread_proxy.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/trees/proxy.cc ('k') | cc/trees/task_runner_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/single_thread_proxy.h
diff --git a/cc/trees/single_thread_proxy.h b/cc/trees/single_thread_proxy.h
index 4ce4ab34fa5b7cd8c4fc72c8d54dee8ec710dcf1..ee424fd81a97edccd724cafb8b5837705aa61d95 100644
--- a/cc/trees/single_thread_proxy.h
+++ b/cc/trees/single_thread_proxy.h
@@ -179,21 +179,22 @@ class CC_EXPORT SingleThreadProxy : public Proxy,
// code is running on the impl thread to satisfy assertion checks.
class DebugScopedSetImplThread {
public:
- explicit DebugScopedSetImplThread(Proxy* proxy) : proxy_(proxy) {
+ explicit DebugScopedSetImplThread(TaskRunnerProvider* task_runner_provider)
+ : task_runner_provider_(task_runner_provider) {
#if DCHECK_IS_ON()
- previous_value_ = proxy_->impl_thread_is_overridden_;
- proxy_->SetCurrentThreadIsImplThread(true);
+ previous_value_ = task_runner_provider_->impl_thread_is_overridden_;
+ task_runner_provider_->SetCurrentThreadIsImplThread(true);
#endif
}
~DebugScopedSetImplThread() {
#if DCHECK_IS_ON()
- proxy_->SetCurrentThreadIsImplThread(previous_value_);
+ task_runner_provider_->SetCurrentThreadIsImplThread(previous_value_);
#endif
}
private:
bool previous_value_;
- Proxy* proxy_;
+ TaskRunnerProvider* task_runner_provider_;
DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThread);
};
@@ -202,21 +203,22 @@ class DebugScopedSetImplThread {
// code is running on the main thread to satisfy assertion checks.
class DebugScopedSetMainThread {
public:
- explicit DebugScopedSetMainThread(Proxy* proxy) : proxy_(proxy) {
+ explicit DebugScopedSetMainThread(TaskRunnerProvider* task_runner_provider)
+ : task_runner_provider_(task_runner_provider) {
#if DCHECK_IS_ON()
- previous_value_ = proxy_->impl_thread_is_overridden_;
- proxy_->SetCurrentThreadIsImplThread(false);
+ previous_value_ = task_runner_provider_->impl_thread_is_overridden_;
+ task_runner_provider_->SetCurrentThreadIsImplThread(false);
#endif
}
~DebugScopedSetMainThread() {
#if DCHECK_IS_ON()
- proxy_->SetCurrentThreadIsImplThread(previous_value_);
+ task_runner_provider_->SetCurrentThreadIsImplThread(previous_value_);
#endif
}
private:
bool previous_value_;
- Proxy* proxy_;
+ TaskRunnerProvider* task_runner_provider_;
DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThread);
};
@@ -226,8 +228,10 @@ class DebugScopedSetMainThread {
// satisfy assertion checks
class DebugScopedSetImplThreadAndMainThreadBlocked {
public:
- explicit DebugScopedSetImplThreadAndMainThreadBlocked(Proxy* proxy)
- : impl_thread_(proxy), main_thread_blocked_(proxy) {}
+ explicit DebugScopedSetImplThreadAndMainThreadBlocked(
+ TaskRunnerProvider* task_runner_provider)
+ : impl_thread_(task_runner_provider),
+ main_thread_blocked_(task_runner_provider) {}
private:
DebugScopedSetImplThread impl_thread_;
« no previous file with comments | « cc/trees/proxy.cc ('k') | cc/trees/task_runner_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698