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/macros.h" |
8 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/message_loop/message_loop.h" |
10 #include "ui/ozone/ozone_export.h" | 12 #include "ui/ozone/ozone_export.h" |
11 | 13 |
12 namespace base { | 14 namespace base { |
13 class SingleThreadTaskRunner; | 15 class SingleThreadTaskRunner; |
14 class Thread; | 16 class Thread; |
15 } | 17 } |
16 | 18 |
17 namespace ui { | 19 namespace ui { |
18 | 20 |
19 class FakeGpuProcess; | 21 class FakeGpuProcess; |
(...skipping 16 matching lines...) Expand all Loading... |
36 const scoped_refptr<base::SingleThreadTaskRunner>& gpu_task_runner); | 38 const scoped_refptr<base::SingleThreadTaskRunner>& gpu_task_runner); |
37 | 39 |
38 private: | 40 private: |
39 scoped_ptr<FakeGpuProcess> fake_gpu_process_; | 41 scoped_ptr<FakeGpuProcess> fake_gpu_process_; |
40 scoped_ptr<FakeGpuProcessHost> fake_gpu_process_host_; | 42 scoped_ptr<FakeGpuProcessHost> fake_gpu_process_host_; |
41 scoped_ptr<base::Thread> io_helper_thread_; | 43 scoped_ptr<base::Thread> io_helper_thread_; |
42 | 44 |
43 DISALLOW_COPY_AND_ASSIGN(OzoneGpuTestHelper); | 45 DISALLOW_COPY_AND_ASSIGN(OzoneGpuTestHelper); |
44 }; | 46 }; |
45 | 47 |
| 48 // Helper class for tests to initialize both UI and GPU Ozone platform. |
| 49 class OZONE_EXPORT OzoneInitializerForTest { |
| 50 public: |
| 51 static scoped_ptr<OzoneInitializerForTest> Create(); |
| 52 ~OzoneInitializerForTest(); |
| 53 |
| 54 private: |
| 55 OzoneInitializerForTest(); |
| 56 bool Initialize(); |
| 57 |
| 58 scoped_ptr<OzoneGpuTestHelper> gpu_helper_; |
| 59 scoped_ptr<base::MessageLoop> message_loop_; |
| 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(OzoneInitializerForTest); |
| 62 }; |
| 63 |
46 } // namespace ui | 64 } // namespace ui |
47 | 65 |
48 #endif // UI_OZONE_PUBLIC_OZONE_GPU_THREAD_HELPER_H_ | 66 #endif // UI_OZONE_PUBLIC_OZONE_GPU_THREAD_HELPER_H_ |
OLD | NEW |