| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_TEST_FAKE_CONTEXT_PROVIDER_H_ | 5 #ifndef CC_TEST_FAKE_CONTEXT_PROVIDER_H_ |
| 6 #define CC_TEST_FAKE_CONTEXT_PROVIDER_H_ | 6 #define CC_TEST_FAKE_CONTEXT_PROVIDER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| 11 #include "cc/context_provider.h" | 11 #include "cc/output/context_provider.h" |
| 12 | 12 |
| 13 namespace cc { | 13 namespace cc { |
| 14 class TestWebGraphicsContext3D; | 14 class TestWebGraphicsContext3D; |
| 15 | 15 |
| 16 class FakeContextProvider : public cc::ContextProvider { | 16 class FakeContextProvider : public cc::ContextProvider { |
| 17 public: | 17 public: |
| 18 typedef base::Callback<scoped_ptr<TestWebGraphicsContext3D>(void)> | 18 typedef base::Callback<scoped_ptr<TestWebGraphicsContext3D>(void)> |
| 19 CreateCallback; | 19 CreateCallback; |
| 20 | 20 |
| 21 static scoped_refptr<FakeContextProvider> Create() { | 21 static scoped_refptr<FakeContextProvider> Create() { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 52 bool bound_; | 52 bool bound_; |
| 53 | 53 |
| 54 base::Lock destroyed_lock_; | 54 base::Lock destroyed_lock_; |
| 55 bool destroyed_; | 55 bool destroyed_; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace cc | 58 } // namespace cc |
| 59 | 59 |
| 60 #endif // CC_TEST_FAKE_CONTEXT_PROVIDER_H_ | 60 #endif // CC_TEST_FAKE_CONTEXT_PROVIDER_H_ |
| 61 | 61 |
| OLD | NEW |