| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 return true; | 58 return true; |
| 59 } | 59 } |
| 60 | 60 |
| 61 bool Connect() override { | 61 bool Connect() override { |
| 62 NOTREACHED(); | 62 NOTREACHED(); |
| 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 { | |
| 69 NOTREACHED(); | |
| 70 return base::kNullProcessId; | |
| 71 } | |
| 72 | |
| 73 private: | 68 private: |
| 74 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; | 69 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; |
| 75 }; | 70 }; |
| 76 | 71 |
| 77 class FakeGpuProcessHost { | 72 class FakeGpuProcessHost { |
| 78 public: | 73 public: |
| 79 FakeGpuProcessHost( | 74 FakeGpuProcessHost( |
| 80 const scoped_refptr<base::SingleThreadTaskRunner>& gpu_task_runner, | 75 const scoped_refptr<base::SingleThreadTaskRunner>& gpu_task_runner, |
| 81 const scoped_refptr<base::SingleThreadTaskRunner>& gpu_io_task_runner) | 76 const scoped_refptr<base::SingleThreadTaskRunner>& gpu_io_task_runner) |
| 82 : gpu_task_runner_(gpu_task_runner), | 77 : gpu_task_runner_(gpu_task_runner), |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 fake_gpu_process_host_.reset(new FakeGpuProcessHost( | 118 fake_gpu_process_host_.reset(new FakeGpuProcessHost( |
| 124 gpu_task_runner, io_helper_thread_->task_runner())); | 119 gpu_task_runner, io_helper_thread_->task_runner())); |
| 125 io_helper_thread_->task_runner()->PostTask( | 120 io_helper_thread_->task_runner()->PostTask( |
| 126 FROM_HERE, base::Bind(&FakeGpuProcessHost::Init, | 121 FROM_HERE, base::Bind(&FakeGpuProcessHost::Init, |
| 127 base::Unretained(fake_gpu_process_host_.get()))); | 122 base::Unretained(fake_gpu_process_host_.get()))); |
| 128 | 123 |
| 129 return true; | 124 return true; |
| 130 } | 125 } |
| 131 | 126 |
| 132 } // namespace ui | 127 } // namespace ui |
| OLD | NEW |