OLD | NEW |
| (Empty) |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_TEST_TEST_CONTEXT_PROVIDER_FACTORY_H_ | |
6 #define CONTENT_TEST_TEST_CONTEXT_PROVIDER_FACTORY_H_ | |
7 | |
8 #include "base/memory/ref_counted.h" | |
9 | |
10 namespace cc { | |
11 class ContextProvider; | |
12 } | |
13 | |
14 namespace webkit { | |
15 namespace gpu { | |
16 class ContextProviderInProcess; | |
17 } | |
18 } | |
19 | |
20 namespace content { | |
21 | |
22 class TestContextProviderFactory { | |
23 public: | |
24 // The returned pointer is static and should not be deleted by the caller. | |
25 static TestContextProviderFactory* GetInstance(); | |
26 | |
27 scoped_refptr<cc::ContextProvider> OffscreenContextProviderForMainThread(); | |
28 | |
29 private: | |
30 TestContextProviderFactory(); | |
31 ~TestContextProviderFactory(); | |
32 | |
33 scoped_refptr<webkit::gpu::ContextProviderInProcess> main_thread_; | |
34 | |
35 DISALLOW_COPY_AND_ASSIGN(TestContextProviderFactory); | |
36 }; | |
37 | |
38 } // namespace content | |
39 | |
40 #endif // CONTENT_TEST_TEST_CONTEXT_PROVIDER_FACTORY_H_ | |
OLD | NEW |