| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/ozone/public/gpu_platform_support_host.h" | 5 #include "ui/ozone/public/gpu_platform_support_host.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
| 9 #include "ui/ozone/ozone_export.h" | 9 #include "ui/ozone/ozone_export.h" |
| 10 | 10 |
| 11 namespace ui { | 11 namespace ui { |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 // No-op implementations of GpuPlatformSupportHost. | 15 // No-op implementations of GpuPlatformSupportHost. |
| 16 class StubGpuPlatformSupportHost : public GpuPlatformSupportHost { | 16 class StubGpuPlatformSupportHost : public GpuPlatformSupportHost { |
| 17 public: | 17 public: |
| 18 // GpuPlatformSupportHost: | 18 // GpuPlatformSupportHost: |
| 19 void OnChannelEstablished( | 19 void OnGpuProcessLaunched( |
| 20 int host_id, | 20 int host_id, |
| 21 scoped_refptr<base::SingleThreadTaskRunner> send_runner, | 21 scoped_refptr<base::SingleThreadTaskRunner> send_runner, |
| 22 const base::Callback<void(IPC::Message*)>& send_callback) override {} | 22 const base::Callback<void(IPC::Message*)>& send_callback) override {} |
| 23 | 23 |
| 24 void OnChannelEstablished() override {} |
| 25 |
| 24 void OnChannelDestroyed(int host_id) override {} | 26 void OnChannelDestroyed(int host_id) override {} |
| 25 bool OnMessageReceived(const IPC::Message&) override { return false; } | 27 bool OnMessageReceived(const IPC::Message&) override { return false; } |
| 26 }; | 28 }; |
| 27 | 29 |
| 28 } // namespace | 30 } // namespace |
| 29 | 31 |
| 30 GpuPlatformSupportHost::GpuPlatformSupportHost() { | 32 GpuPlatformSupportHost::GpuPlatformSupportHost() { |
| 31 } | 33 } |
| 32 | 34 |
| 33 GpuPlatformSupportHost::~GpuPlatformSupportHost() { | 35 GpuPlatformSupportHost::~GpuPlatformSupportHost() { |
| 34 } | 36 } |
| 35 | 37 |
| 36 GpuPlatformSupportHost* CreateStubGpuPlatformSupportHost() { | 38 GpuPlatformSupportHost* CreateStubGpuPlatformSupportHost() { |
| 37 return new StubGpuPlatformSupportHost; | 39 return new StubGpuPlatformSupportHost; |
| 38 } | 40 } |
| 39 | 41 |
| 40 } // namespace ui | 42 } // namespace ui |
| OLD | NEW |