| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 gpu::gles2::MailboxManager* mailbox_manager, | 51 gpu::gles2::MailboxManager* mailbox_manager, |
| 52 base::SingleThreadTaskRunner* task_runner, | 52 base::SingleThreadTaskRunner* task_runner, |
| 53 base::SingleThreadTaskRunner* io_task_runner, | 53 base::SingleThreadTaskRunner* io_task_runner, |
| 54 int client_id, | 54 int client_id, |
| 55 uint64_t client_tracing_id, | 55 uint64_t client_tracing_id, |
| 56 bool allow_future_sync_points); | 56 bool allow_future_sync_points); |
| 57 ~TestGpuChannel() override; | 57 ~TestGpuChannel() override; |
| 58 | 58 |
| 59 base::ProcessId GetClientPID() const override; | 59 base::ProcessId GetClientPID() const override; |
| 60 | 60 |
| 61 IPC::ChannelHandle Init(base::WaitableEvent* shutdown_event, | 61 IPC::ChannelHandle Init(base::WaitableEvent* shutdown_event) override; |
| 62 IPC::AttachmentBroker* attachment_broker) override; | |
| 63 | 62 |
| 64 // IPC::Sender implementation. | 63 // IPC::Sender implementation. |
| 65 bool Send(IPC::Message* msg) override; | 64 bool Send(IPC::Message* msg) override; |
| 66 | 65 |
| 67 void AddFilter(IPC::MessageFilter* filter) override; | 66 void AddFilter(IPC::MessageFilter* filter) override; |
| 68 void RemoveFilter(IPC::MessageFilter* filter) override; | 67 void RemoveFilter(IPC::MessageFilter* filter) override; |
| 69 | 68 |
| 70 private: | 69 private: |
| 71 IPC::TestSink* const sink_; | 70 IPC::TestSink* const sink_; |
| 72 }; | 71 }; |
| 73 | 72 |
| 74 class GpuChannelTestCommon : public testing::Test { | 73 class GpuChannelTestCommon : public testing::Test { |
| 75 public: | 74 public: |
| 76 GpuChannelTestCommon(); | 75 GpuChannelTestCommon(); |
| 77 ~GpuChannelTestCommon() override; | 76 ~GpuChannelTestCommon() override; |
| 78 | 77 |
| 79 protected: | 78 protected: |
| 80 IPC::TestSink* sink() { return sink_.get(); } | 79 IPC::TestSink* sink() { return sink_.get(); } |
| 81 GpuChannelManager* channel_manager() { return channel_manager_.get(); } | 80 GpuChannelManager* channel_manager() { return channel_manager_.get(); } |
| 82 | 81 |
| 83 private: | 82 private: |
| 84 scoped_ptr<IPC::TestSink> sink_; | 83 scoped_ptr<IPC::TestSink> sink_; |
| 85 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 84 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 86 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | 85 scoped_refptr<base::SingleThreadTaskRunner> 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 |