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" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 virtual scoped_ptr<base::Value> AsValue() const = 0; | 94 virtual scoped_ptr<base::Value> AsValue() const = 0; |
95 | 95 |
96 virtual void SetDebugState(const LayerTreeDebugState& debug_state) = 0; | 96 virtual void SetDebugState(const LayerTreeDebugState& debug_state) = 0; |
97 | 97 |
98 // Testing hooks | 98 // Testing hooks |
99 virtual bool CommitPendingForTesting() = 0; | 99 virtual bool CommitPendingForTesting() = 0; |
100 virtual scoped_ptr<base::Value> SchedulerAsValueForTesting(); | 100 virtual scoped_ptr<base::Value> SchedulerAsValueForTesting(); |
101 | 101 |
102 protected: | 102 protected: |
103 explicit Proxy( | 103 Proxy(scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
104 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); | 104 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); |
105 friend class DebugScopedSetImplThread; | 105 friend class DebugScopedSetImplThread; |
106 friend class DebugScopedSetMainThread; | 106 friend class DebugScopedSetMainThread; |
107 friend class DebugScopedSetMainThreadBlocked; | 107 friend class DebugScopedSetMainThreadBlocked; |
108 | 108 |
109 private: | 109 private: |
110 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 110 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
111 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_; | 111 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_; |
112 #if DCHECK_IS_ON | 112 #if DCHECK_IS_ON |
113 const base::PlatformThreadId main_thread_id_; | 113 const base::PlatformThreadId main_thread_id_; |
114 bool impl_thread_is_overridden_; | 114 bool impl_thread_is_overridden_; |
(...skipping 24 matching lines...) Expand all Loading... |
139 explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) {} | 139 explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) {} |
140 ~DebugScopedSetMainThreadBlocked() {} | 140 ~DebugScopedSetMainThreadBlocked() {} |
141 private: | 141 private: |
142 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThreadBlocked); | 142 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThreadBlocked); |
143 }; | 143 }; |
144 #endif | 144 #endif |
145 | 145 |
146 } // namespace cc | 146 } // namespace cc |
147 | 147 |
148 #endif // CC_TREES_PROXY_H_ | 148 #endif // CC_TREES_PROXY_H_ |
OLD | NEW |