Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Side by Side Diff: content/common/gpu/gpu_channel_test_common.h

Issue 1703163002: Remove dependency on GURL from content/common/gpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary include from gpu_command_buffer_stub Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "content/common/gpu/gpu_channel.h" 8 #include "content/common/gpu/gpu_channel.h"
9 #include "content/common/gpu/gpu_channel_manager.h" 9 #include "content/common/gpu/gpu_channel_manager.h"
10 #include "content/common/gpu/gpu_channel_manager_delegate.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 12
12 namespace base { 13 namespace base {
13 class TestSimpleTaskRunner; 14 class TestSimpleTaskRunner;
14 } // namespace base 15 } // namespace base
15 16
16 namespace IPC { 17 namespace IPC {
17 class TestSink; 18 class TestSink;
18 } // namespace IPC 19 } // namespace IPC
19 20
20 namespace content { 21 namespace content {
21 22
22 class SyncPointManager; 23 class SyncPointManager;
23 24
25 class TestGpuChannelManagerDelegate : public GpuChannelManagerDelegate {
26 public:
27 TestGpuChannelManagerDelegate();
28 ~TestGpuChannelManagerDelegate() override;
29
30 // GpuChannelManagerDelegate implementation.
31 void SetActiveURL(const std::string& url) override;
32
33 private:
34 DISALLOW_COPY_AND_ASSIGN(TestGpuChannelManagerDelegate);
35 };
36
24 class TestGpuChannelManager : public GpuChannelManager { 37 class TestGpuChannelManager : public GpuChannelManager {
25 public: 38 public:
26 TestGpuChannelManager(IPC::TestSink* sink, 39 TestGpuChannelManager(IPC::TestSink* sink,
40 GpuChannelManagerDelegate* delegate,
27 base::SingleThreadTaskRunner* task_runner, 41 base::SingleThreadTaskRunner* task_runner,
28 base::SingleThreadTaskRunner* io_task_runner, 42 base::SingleThreadTaskRunner* io_task_runner,
29 gpu::SyncPointManager* sync_point_manager, 43 gpu::SyncPointManager* sync_point_manager,
30 GpuMemoryBufferFactory* gpu_memory_buffer_factory); 44 GpuMemoryBufferFactory* gpu_memory_buffer_factory);
31 ~TestGpuChannelManager() override; 45 ~TestGpuChannelManager() override;
32 46
33 // IPC::Sender implementation. 47 // IPC::Sender implementation.
34 bool Send(IPC::Message* msg) override; 48 bool Send(IPC::Message* msg) override;
35 49
36 protected: 50 protected:
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 protected: 94 protected:
81 IPC::TestSink* sink() { return sink_.get(); } 95 IPC::TestSink* sink() { return sink_.get(); }
82 GpuChannelManager* channel_manager() { return channel_manager_.get(); } 96 GpuChannelManager* channel_manager() { return channel_manager_.get(); }
83 base::TestSimpleTaskRunner* task_runner() { return task_runner_.get(); } 97 base::TestSimpleTaskRunner* task_runner() { return task_runner_.get(); }
84 98
85 private: 99 private:
86 scoped_ptr<IPC::TestSink> sink_; 100 scoped_ptr<IPC::TestSink> sink_;
87 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; 101 scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
88 scoped_refptr<base::TestSimpleTaskRunner> io_task_runner_; 102 scoped_refptr<base::TestSimpleTaskRunner> io_task_runner_;
89 scoped_ptr<gpu::SyncPointManager> sync_point_manager_; 103 scoped_ptr<gpu::SyncPointManager> sync_point_manager_;
104 scoped_ptr<TestGpuChannelManagerDelegate> channel_manager_delegate_;
90 scoped_ptr<GpuChannelManager> channel_manager_; 105 scoped_ptr<GpuChannelManager> channel_manager_;
91 }; 106 };
92 107
93 } // namespace content 108 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel_manager_delegate.h ('k') | content/common/gpu/gpu_channel_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698