OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 UI_OZONE_PUBLIC_OZONE_GPU_THREAD_HELPER_H_ | 5 #ifndef UI_OZONE_PUBLIC_OZONE_GPU_THREAD_HELPER_H_ |
6 #define UI_OZONE_PUBLIC_OZONE_GPU_THREAD_HELPER_H_ | 6 #define UI_OZONE_PUBLIC_OZONE_GPU_THREAD_HELPER_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/ozone/ozone_export.h" | 10 #include "ui/ozone/ozone_export.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 const scoped_refptr<base::SingleThreadTaskRunner>& gpu_task_runner); | 36 const scoped_refptr<base::SingleThreadTaskRunner>& gpu_task_runner); |
37 | 37 |
38 private: | 38 private: |
39 scoped_ptr<FakeGpuProcess> fake_gpu_process_; | 39 scoped_ptr<FakeGpuProcess> fake_gpu_process_; |
40 scoped_ptr<FakeGpuProcessHost> fake_gpu_process_host_; | 40 scoped_ptr<FakeGpuProcessHost> fake_gpu_process_host_; |
41 scoped_ptr<base::Thread> io_helper_thread_; | 41 scoped_ptr<base::Thread> io_helper_thread_; |
42 | 42 |
43 DISALLOW_COPY_AND_ASSIGN(OzoneGpuTestHelper); | 43 DISALLOW_COPY_AND_ASSIGN(OzoneGpuTestHelper); |
44 }; | 44 }; |
45 | 45 |
| 46 // Helper class for tests to initialize both UI and GPU Ozone platform. |
| 47 class OZONE_EXPORT OzoneInitializerForTest { |
| 48 public: |
| 49 static scoped_ptr<OzoneInitializerForTest> Create(); |
| 50 ~OzoneInitializerForTest(); |
| 51 |
| 52 private: |
| 53 OzoneInitializerForTest(); |
| 54 bool Initialize(); |
| 55 |
| 56 scoped_ptr<OzoneGpuTestHelper> gpu_helper_; |
| 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(OzoneInitializerForTest); |
| 59 }; |
| 60 |
46 } // namespace ui | 61 } // namespace ui |
47 | 62 |
48 #endif // UI_OZONE_PUBLIC_OZONE_GPU_THREAD_HELPER_H_ | 63 #endif // UI_OZONE_PUBLIC_OZONE_GPU_THREAD_HELPER_H_ |
OLD | NEW |