OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_PROXY_H_ | 5 #ifndef CC_TREES_PROXY_H_ |
6 #define CC_TREES_PROXY_H_ | 6 #define CC_TREES_PROXY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) : proxy_(proxy) { | 133 explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) : proxy_(proxy) { |
134 DCHECK(!proxy_->IsMainThreadBlocked()); | 134 DCHECK(!proxy_->IsMainThreadBlocked()); |
135 proxy_->SetMainThreadBlocked(true); | 135 proxy_->SetMainThreadBlocked(true); |
136 } | 136 } |
137 ~DebugScopedSetMainThreadBlocked() { | 137 ~DebugScopedSetMainThreadBlocked() { |
138 DCHECK(proxy_->IsMainThreadBlocked()); | 138 DCHECK(proxy_->IsMainThreadBlocked()); |
139 proxy_->SetMainThreadBlocked(false); | 139 proxy_->SetMainThreadBlocked(false); |
140 } | 140 } |
141 private: | 141 private: |
142 Proxy* proxy_; | 142 Proxy* proxy_; |
| 143 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThreadBlocked); |
143 }; | 144 }; |
144 #else | 145 #else |
145 class DebugScopedSetMainThreadBlocked { | 146 class DebugScopedSetMainThreadBlocked { |
146 public: | 147 public: |
147 explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) {} | 148 explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) {} |
148 ~DebugScopedSetMainThreadBlocked() {} | 149 ~DebugScopedSetMainThreadBlocked() {} |
| 150 private: |
| 151 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThreadBlocked); |
149 }; | 152 }; |
150 #endif | 153 #endif |
151 | 154 |
152 } // namespace cc | 155 } // namespace cc |
153 | 156 |
154 #endif // CC_TREES_PROXY_H_ | 157 #endif // CC_TREES_PROXY_H_ |
OLD | NEW |