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

Side by Side Diff: gpu/ipc/service/gpu_channel_test_common.h

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 4 years, 8 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
« no previous file with comments | « gpu/ipc/service/gpu_channel_manager.cc ('k') | gpu/ipc/service/gpu_channel_test_common.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <memory>
8
8 #include "gpu/command_buffer/service/gpu_preferences.h" 9 #include "gpu/command_buffer/service/gpu_preferences.h"
9 #include "gpu/ipc/service/gpu_channel.h" 10 #include "gpu/ipc/service/gpu_channel.h"
10 #include "gpu/ipc/service/gpu_channel_manager.h" 11 #include "gpu/ipc/service/gpu_channel_manager.h"
11 #include "gpu/ipc/service/gpu_channel_manager_delegate.h" 12 #include "gpu/ipc/service/gpu_channel_manager_delegate.h"
12 #include "ipc/ipc_test_sink.h" 13 #include "ipc/ipc_test_sink.h"
13 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
14 15
15 class GURL; 16 class GURL;
16 17
17 namespace base { 18 namespace base {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 public: 69 public:
69 TestGpuChannelManager(const GpuPreferences& gpu_preferences, 70 TestGpuChannelManager(const GpuPreferences& gpu_preferences,
70 GpuChannelManagerDelegate* delegate, 71 GpuChannelManagerDelegate* delegate,
71 base::SingleThreadTaskRunner* task_runner, 72 base::SingleThreadTaskRunner* task_runner,
72 base::SingleThreadTaskRunner* io_task_runner, 73 base::SingleThreadTaskRunner* io_task_runner,
73 SyncPointManager* sync_point_manager, 74 SyncPointManager* sync_point_manager,
74 GpuMemoryBufferFactory* gpu_memory_buffer_factory); 75 GpuMemoryBufferFactory* gpu_memory_buffer_factory);
75 ~TestGpuChannelManager() override; 76 ~TestGpuChannelManager() override;
76 77
77 protected: 78 protected:
78 scoped_ptr<GpuChannel> CreateGpuChannel( 79 std::unique_ptr<GpuChannel> CreateGpuChannel(
79 int client_id, 80 int client_id,
80 uint64_t client_tracing_id, 81 uint64_t client_tracing_id,
81 bool preempts, 82 bool preempts,
82 bool allow_view_command_buffers, 83 bool allow_view_command_buffers,
83 bool allow_real_time_streams) override; 84 bool allow_real_time_streams) override;
84 }; 85 };
85 86
86 class TestGpuChannel : public GpuChannel { 87 class TestGpuChannel : public GpuChannel {
87 public: 88 public:
88 TestGpuChannel(GpuChannelManager* gpu_channel_manager, 89 TestGpuChannel(GpuChannelManager* gpu_channel_manager,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 GpuChannelManager* channel_manager() { return channel_manager_.get(); } 121 GpuChannelManager* channel_manager() { return channel_manager_.get(); }
121 TestGpuChannelManagerDelegate* channel_manager_delegate() { 122 TestGpuChannelManagerDelegate* channel_manager_delegate() {
122 return channel_manager_delegate_.get(); 123 return channel_manager_delegate_.get();
123 } 124 }
124 base::TestSimpleTaskRunner* task_runner() { return task_runner_.get(); } 125 base::TestSimpleTaskRunner* task_runner() { return task_runner_.get(); }
125 126
126 private: 127 private:
127 GpuPreferences gpu_preferences_; 128 GpuPreferences gpu_preferences_;
128 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; 129 scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
129 scoped_refptr<base::TestSimpleTaskRunner> io_task_runner_; 130 scoped_refptr<base::TestSimpleTaskRunner> io_task_runner_;
130 scoped_ptr<SyncPointManager> sync_point_manager_; 131 std::unique_ptr<SyncPointManager> sync_point_manager_;
131 scoped_ptr<TestGpuChannelManagerDelegate> channel_manager_delegate_; 132 std::unique_ptr<TestGpuChannelManagerDelegate> channel_manager_delegate_;
132 scoped_ptr<GpuChannelManager> channel_manager_; 133 std::unique_ptr<GpuChannelManager> channel_manager_;
133 }; 134 };
134 135
135 } // namespace gpu 136 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_channel_manager.cc ('k') | gpu/ipc/service/gpu_channel_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698