OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_OUTPUT_CONTEXT_PROVIDER_H_ | 5 #ifndef CC_OUTPUT_CONTEXT_PROVIDER_H_ |
6 #define CC_OUTPUT_CONTEXT_PROVIDER_H_ | 6 #define CC_OUTPUT_CONTEXT_PROVIDER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
96 // called from the same thread that the context is bound to. To avoid races, | 96 // called from the same thread that the context is bound to. To avoid races, |
97 // it should be called before BindToCurrentThread(), or VerifyContexts() | 97 // it should be called before BindToCurrentThread(), or VerifyContexts() |
98 // should be called after setting the callback. | 98 // should be called after setting the callback. |
99 typedef base::Closure LostContextCallback; | 99 typedef base::Closure LostContextCallback; |
100 virtual void SetLostContextCallback( | 100 virtual void SetLostContextCallback( |
101 const LostContextCallback& lost_context_callback) = 0; | 101 const LostContextCallback& lost_context_callback) = 0; |
102 | 102 |
103 // Sets a callback to be called when the memory policy changes. This should be | 103 // Sets a callback to be called when the memory policy changes. This should be |
104 // called from the same thread that the context is bound to. | 104 // called from the same thread that the context is bound to. |
105 typedef base::Callback<void(const ManagedMemoryPolicy& policy)> | 105 typedef base::Callback<void(const ManagedMemoryPolicy& policy)> |
106 MemoryPolicyChangedCallback; | 106 MemoryPolicyChangedCallback; |
piman
2015/09/24 21:34:08
nit: remove this, since it shouldn't be used anymo
sohanjg
2015/09/28 07:35:49
Done.
| |
107 virtual void SetMemoryPolicyChangedCallback( | |
108 const MemoryPolicyChangedCallback& memory_policy_changed_callback) = 0; | |
109 | 107 |
110 protected: | 108 protected: |
111 friend class base::RefCountedThreadSafe<ContextProvider>; | 109 friend class base::RefCountedThreadSafe<ContextProvider>; |
112 virtual ~ContextProvider() {} | 110 virtual ~ContextProvider() {} |
113 }; | 111 }; |
114 | 112 |
115 } // namespace cc | 113 } // namespace cc |
116 | 114 |
117 #endif // CC_OUTPUT_CONTEXT_PROVIDER_H_ | 115 #endif // CC_OUTPUT_CONTEXT_PROVIDER_H_ |
OLD | NEW |