| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
| 6 #include "content/common/gpu/gpu_channel.h" | 6 #include "content/common/gpu/gpu_channel.h" |
| 7 #include "content/common/gpu/gpu_channel_manager.h" | 7 #include "content/common/gpu/gpu_channel_manager.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 base::SingleThreadTaskRunner* task_runner, | 53 base::SingleThreadTaskRunner* task_runner, |
| 54 base::SingleThreadTaskRunner* io_task_runner, | 54 base::SingleThreadTaskRunner* io_task_runner, |
| 55 int client_id, | 55 int client_id, |
| 56 uint64_t client_tracing_id, | 56 uint64_t client_tracing_id, |
| 57 bool allow_future_sync_points, | 57 bool allow_future_sync_points, |
| 58 bool allow_real_time_streams); | 58 bool allow_real_time_streams); |
| 59 ~TestGpuChannel() override; | 59 ~TestGpuChannel() override; |
| 60 | 60 |
| 61 base::ProcessId GetClientPID() const override; | 61 base::ProcessId GetClientPID() const override; |
| 62 | 62 |
| 63 IPC::ChannelHandle Init(base::WaitableEvent* shutdown_event, | 63 IPC::ChannelHandle Init(base::WaitableEvent* shutdown_event) override; |
| 64 IPC::AttachmentBroker* attachment_broker) override; | |
| 65 | 64 |
| 66 // IPC::Sender implementation. | 65 // IPC::Sender implementation. |
| 67 bool Send(IPC::Message* msg) override; | 66 bool Send(IPC::Message* msg) override; |
| 68 | 67 |
| 69 private: | 68 private: |
| 70 IPC::TestSink* const sink_; | 69 IPC::TestSink* const sink_; |
| 71 }; | 70 }; |
| 72 | 71 |
| 73 class GpuChannelTestCommon : public testing::Test { | 72 class GpuChannelTestCommon : public testing::Test { |
| 74 public: | 73 public: |
| 75 GpuChannelTestCommon(); | 74 GpuChannelTestCommon(); |
| 76 ~GpuChannelTestCommon() override; | 75 ~GpuChannelTestCommon() override; |
| 77 | 76 |
| 78 protected: | 77 protected: |
| 79 IPC::TestSink* sink() { return sink_.get(); } | 78 IPC::TestSink* sink() { return sink_.get(); } |
| 80 GpuChannelManager* channel_manager() { return channel_manager_.get(); } | 79 GpuChannelManager* channel_manager() { return channel_manager_.get(); } |
| 81 base::TestSimpleTaskRunner* task_runner() { return task_runner_.get(); } | 80 base::TestSimpleTaskRunner* task_runner() { return task_runner_.get(); } |
| 82 | 81 |
| 83 private: | 82 private: |
| 84 scoped_ptr<IPC::TestSink> sink_; | 83 scoped_ptr<IPC::TestSink> sink_; |
| 85 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; | 84 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; |
| 86 scoped_refptr<base::TestSimpleTaskRunner> io_task_runner_; | 85 scoped_refptr<base::TestSimpleTaskRunner> io_task_runner_; |
| 87 scoped_ptr<gpu::SyncPointManager> sync_point_manager_; | 86 scoped_ptr<gpu::SyncPointManager> sync_point_manager_; |
| 88 scoped_ptr<GpuChannelManager> channel_manager_; | 87 scoped_ptr<GpuChannelManager> channel_manager_; |
| 89 }; | 88 }; |
| 90 | 89 |
| 91 } // namespace content | 90 } // namespace content |
| OLD | NEW |