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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/threading/platform_thread.h" |
14 #include "base/time/time.h" | 15 #include "base/time/time.h" |
15 #include "base/values.h" | 16 #include "base/values.h" |
16 #include "cc/base/cc_export.h" | 17 #include "cc/base/cc_export.h" |
17 | 18 |
18 namespace base { class SingleThreadTaskRunner; } | 19 namespace base { class SingleThreadTaskRunner; } |
19 | 20 |
20 namespace gfx { | 21 namespace gfx { |
21 class Rect; | 22 class Rect; |
22 class Vector2d; | 23 class Vector2d; |
23 } | 24 } |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 explicit Proxy( | 101 explicit Proxy( |
101 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); | 102 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); |
102 friend class DebugScopedSetImplThread; | 103 friend class DebugScopedSetImplThread; |
103 friend class DebugScopedSetMainThread; | 104 friend class DebugScopedSetMainThread; |
104 friend class DebugScopedSetMainThreadBlocked; | 105 friend class DebugScopedSetMainThreadBlocked; |
105 | 106 |
106 private: | 107 private: |
107 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 108 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
108 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_; | 109 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_; |
109 #if DCHECK_IS_ON | 110 #if DCHECK_IS_ON |
| 111 const base::PlatformThreadId main_thread_id_; |
110 bool impl_thread_is_overridden_; | 112 bool impl_thread_is_overridden_; |
111 bool is_main_thread_blocked_; | 113 bool is_main_thread_blocked_; |
112 #endif | 114 #endif |
113 | 115 |
114 DISALLOW_COPY_AND_ASSIGN(Proxy); | 116 DISALLOW_COPY_AND_ASSIGN(Proxy); |
115 }; | 117 }; |
116 | 118 |
117 #if DCHECK_IS_ON | 119 #if DCHECK_IS_ON |
118 class DebugScopedSetMainThreadBlocked { | 120 class DebugScopedSetMainThreadBlocked { |
119 public: | 121 public: |
(...skipping 15 matching lines...) Expand all Loading... |
135 explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) {} | 137 explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) {} |
136 ~DebugScopedSetMainThreadBlocked() {} | 138 ~DebugScopedSetMainThreadBlocked() {} |
137 private: | 139 private: |
138 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThreadBlocked); | 140 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThreadBlocked); |
139 }; | 141 }; |
140 #endif | 142 #endif |
141 | 143 |
142 } // namespace cc | 144 } // namespace cc |
143 | 145 |
144 #endif // CC_TREES_PROXY_H_ | 146 #endif // CC_TREES_PROXY_H_ |
OLD | NEW |