- add sources.
[platform/framework/web/crosswalk.git] / src / webkit / common / gpu / test_context_provider_factory.h
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
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_COMMON_GPU_TEST_CONTEXT_PROVIDER_FACTORY_H_
6 #define WEBKIT_COMMON_GPU_TEST_CONTEXT_PROVIDER_FACTORY_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "webkit/common/gpu/webkit_gpu_export.h"
10
11 namespace cc {
12 class ContextProvider;
13 }
14
15 namespace webkit {
16 namespace gpu {
17 class ContextProviderInProcess;
18
19 class WEBKIT_GPU_EXPORT TestContextProviderFactory {
20  public:
21   // The returned pointer is static and should not be deleted by the caller.
22   static TestContextProviderFactory* GetInstance();
23
24   scoped_refptr<cc::ContextProvider> OffscreenContextProviderForMainThread();
25
26  private:
27   TestContextProviderFactory();
28   ~TestContextProviderFactory();
29
30   scoped_refptr<webkit::gpu::ContextProviderInProcess> main_thread_;
31
32   DISALLOW_COPY_AND_ASSIGN(TestContextProviderFactory);
33 };
34
35 }  // namespace gpu
36 }  // namespace webkit
37
38 #endif  // WEBKIT_COMMON_GPU_TEST_CONTEXT_PROVIDER_FACTORY_H_