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

Unified Diff: ui/ozone/public/ozone_gpu_test_helper.cc

Issue 2349713003: IPC::MessageFilter::OnFilterAdded: IPC::Sender -> IPC::Channel (Closed)
Patch Set: . Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_thread_message_proxy.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/public/ozone_gpu_test_helper.cc
diff --git a/ui/ozone/public/ozone_gpu_test_helper.cc b/ui/ozone/public/ozone_gpu_test_helper.cc
index a24bf6a0f9d183155e6816903f31bf03774676d1..aba0309ea0d4302dd6a3c0f2863862f01c41cc0e 100644
--- a/ui/ozone/public/ozone_gpu_test_helper.cc
+++ b/ui/ozone/public/ozone_gpu_test_helper.cc
@@ -35,16 +35,13 @@ void DispatchToGpuPlatformSupportTaskOnIO(IPC::Message* msg) {
} // namespace
-class FakeGpuProcess : public IPC::Sender {
+class FakeGpuProcess : public IPC::Channel {
public:
FakeGpuProcess(
const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner)
: ui_task_runner_(ui_task_runner) {}
~FakeGpuProcess() override {}
- void Init() {
- }
-
void InitOnIO() {
IPC::MessageFilter* filter =
ui::OzonePlatform::GetInstance()->GetGpuMessageFilter();
@@ -53,12 +50,42 @@ class FakeGpuProcess : public IPC::Sender {
filter->OnFilterAdded(this);
}
+ // IPC::Channel implementation:
bool Send(IPC::Message* msg) override {
ui_task_runner_->PostTask(
FROM_HERE, base::Bind(&DispatchToGpuPlatformSupportHostTask, msg));
return true;
}
+ bool Connect() override {
+ NOTREACHED();
+ return false;
+ }
+
+ void Close() override { NOTREACHED(); }
+
+ base::ProcessId GetPeerPID() const override {
+ NOTREACHED();
+ return base::kNullProcessId;
+ }
+
+ base::ProcessId GetSelfPID() const override {
+ NOTREACHED();
+ return base::kNullProcessId;
+ }
+
+#if defined(OS_POSIX) && !defined(OS_NACL_SFI)
+ int GetClientFileDescriptor() const override {
+ NOTREACHED();
+ return 0;
+ }
+
+ base::ScopedFD TakeClientFileDescriptor() override {
+ NOTREACHED();
+ return base::ScopedFD();
+ }
+#endif
+
private:
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
};
@@ -104,7 +131,6 @@ bool OzoneGpuTestHelper::Initialize(
io_helper_thread_->task_runner()->PostTask(
FROM_HERE, base::Bind(&FakeGpuProcess::InitOnIO,
base::Unretained(fake_gpu_process_.get())));
- fake_gpu_process_->Init();
fake_gpu_process_host_.reset(new FakeGpuProcessHost(
gpu_task_runner, io_helper_thread_->task_runner()));
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_thread_message_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698