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

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

Issue 2127693002: Use ChannelMojo for GpuChannels. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-channel-gpu
Patch Set: rebase Created 4 years, 5 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.cc ('k') | no next file » | 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 "gpu/ipc/service/gpu_channel_test_common.h" 5 #include "gpu/ipc/service/gpu_channel_test_common.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/test/test_simple_task_runner.h" 8 #include "base/test/test_simple_task_runner.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "gpu/command_buffer/service/sync_point_manager.h" 10 #include "gpu/command_buffer/service/sync_point_manager.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // Call stubs here so that any IPC messages sent are handled using the 113 // Call stubs here so that any IPC messages sent are handled using the
114 // overridden Send method. 114 // overridden Send method.
115 stubs_.clear(); 115 stubs_.clear();
116 } 116 }
117 117
118 base::ProcessId TestGpuChannel::GetClientPID() const { 118 base::ProcessId TestGpuChannel::GetClientPID() const {
119 return base::kNullProcessId; 119 return base::kNullProcessId;
120 } 120 }
121 121
122 IPC::ChannelHandle TestGpuChannel::Init(base::WaitableEvent* shutdown_event) { 122 IPC::ChannelHandle TestGpuChannel::Init(base::WaitableEvent* shutdown_event) {
123 channel_id_ = "ChannelMojo-gpu";
123 filter_->OnFilterAdded(&sink_); 124 filter_->OnFilterAdded(&sink_);
124 return IPC::ChannelHandle(channel_id()); 125 return IPC::ChannelHandle(channel_id());
125 } 126 }
126 127
127 bool TestGpuChannel::Send(IPC::Message* msg) { 128 bool TestGpuChannel::Send(IPC::Message* msg) {
128 DCHECK(!msg->is_sync()); 129 DCHECK(!msg->is_sync());
129 return sink_.Send(msg); 130 return sink_.Send(msg);
130 } 131 }
131 132
132 // TODO(sunnyps): Use a mock memory buffer factory when necessary. 133 // TODO(sunnyps): Use a mock memory buffer factory when necessary.
(...skipping 15 matching lines...) Expand all
148 io_task_runner_.get(), sync_point_manager_.get(), nullptr)); 149 io_task_runner_.get(), sync_point_manager_.get(), nullptr));
149 } 150 }
150 151
151 void GpuChannelTestCommon::TearDown() { 152 void GpuChannelTestCommon::TearDown() {
152 // Destroying channels causes tasks to run on the IO task runner. 153 // Destroying channels causes tasks to run on the IO task runner.
153 channel_manager_ = nullptr; 154 channel_manager_ = nullptr;
154 } 155 }
155 156
156 157
157 } // namespace gpu 158 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_channel.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698