| 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 #include "ui/ozone/public/ozone_gpu_test_helper.h" | 5 #include "ui/ozone/public/ozone_gpu_test_helper.h" |
| 6 | 6 |
| 7 #include "base/threading/thread.h" | 7 #include "base/threading/thread.h" |
| 8 #include "base/threading/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
| 9 #include "ipc/ipc_listener.h" | 9 #include "ipc/ipc_listener.h" |
| 10 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 return false; | 63 return false; |
| 64 } | 64 } |
| 65 | 65 |
| 66 void Close() override { NOTREACHED(); } | 66 void Close() override { NOTREACHED(); } |
| 67 | 67 |
| 68 base::ProcessId GetPeerPID() const override { | 68 base::ProcessId GetPeerPID() const override { |
| 69 NOTREACHED(); | 69 NOTREACHED(); |
| 70 return base::kNullProcessId; | 70 return base::kNullProcessId; |
| 71 } | 71 } |
| 72 | 72 |
| 73 base::ProcessId GetSelfPID() const override { | |
| 74 NOTREACHED(); | |
| 75 return base::kNullProcessId; | |
| 76 } | |
| 77 | |
| 78 #if defined(OS_POSIX) && !defined(OS_NACL_SFI) | |
| 79 int GetClientFileDescriptor() const override { | |
| 80 NOTREACHED(); | |
| 81 return 0; | |
| 82 } | |
| 83 | |
| 84 base::ScopedFD TakeClientFileDescriptor() override { | |
| 85 NOTREACHED(); | |
| 86 return base::ScopedFD(); | |
| 87 } | |
| 88 #endif | |
| 89 | |
| 90 private: | 73 private: |
| 91 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; | 74 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; |
| 92 }; | 75 }; |
| 93 | 76 |
| 94 class FakeGpuProcessHost { | 77 class FakeGpuProcessHost { |
| 95 public: | 78 public: |
| 96 FakeGpuProcessHost( | 79 FakeGpuProcessHost( |
| 97 const scoped_refptr<base::SingleThreadTaskRunner>& gpu_task_runner, | 80 const scoped_refptr<base::SingleThreadTaskRunner>& gpu_task_runner, |
| 98 const scoped_refptr<base::SingleThreadTaskRunner>& gpu_io_task_runner) | 81 const scoped_refptr<base::SingleThreadTaskRunner>& gpu_io_task_runner) |
| 99 : gpu_task_runner_(gpu_task_runner), | 82 : gpu_task_runner_(gpu_task_runner), |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 base::Unretained(fake_gpu_process_.get()))); | 121 base::Unretained(fake_gpu_process_.get()))); |
| 139 | 122 |
| 140 fake_gpu_process_host_.reset(new FakeGpuProcessHost( | 123 fake_gpu_process_host_.reset(new FakeGpuProcessHost( |
| 141 gpu_task_runner, io_helper_thread_->task_runner())); | 124 gpu_task_runner, io_helper_thread_->task_runner())); |
| 142 fake_gpu_process_host_->Init(); | 125 fake_gpu_process_host_->Init(); |
| 143 | 126 |
| 144 return true; | 127 return true; |
| 145 } | 128 } |
| 146 | 129 |
| 147 } // namespace ui | 130 } // namespace ui |
| OLD | NEW |