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
3 // found in the LICENSE file.
5 #ifndef UI_OZONE_PLATFORM_DRI_GPU_PLATFORM_SUPPORT_HOST_GBM_H_
6 #define UI_OZONE_PLATFORM_DRI_GPU_PLATFORM_SUPPORT_HOST_GBM_H_
10 #include "ui/gfx/native_widget_types.h"
11 #include "ui/ozone/platform/dri/hardware_cursor_delegate.h"
12 #include "ui/ozone/public/gpu_platform_support_host.h"
22 class GpuPlatformSupportHostGbm : public GpuPlatformSupportHost,
23 public HardwareCursorDelegate,
26 GpuPlatformSupportHostGbm();
27 virtual ~GpuPlatformSupportHostGbm();
29 void RegisterHandler(GpuPlatformSupportHost* handler);
30 void UnregisterHandler(GpuPlatformSupportHost* handler);
32 // GpuPlatformSupportHost:
33 virtual void OnChannelEstablished(int host_id, IPC::Sender* sender) OVERRIDE;
34 virtual void OnChannelDestroyed(int host_id) OVERRIDE;
37 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
40 virtual bool Send(IPC::Message* message) OVERRIDE;
42 // HardwareCursorDelegate:
43 virtual void SetHardwareCursor(gfx::AcceleratedWidget widget,
44 const SkBitmap& bitmap,
45 const gfx::Point& location) OVERRIDE;
46 virtual void MoveHardwareCursor(gfx::AcceleratedWidget widget,
47 const gfx::Point& location) OVERRIDE;
52 std::vector<GpuPlatformSupportHost*> handlers_;
57 #endif // UI_OZONE_GPU_GPU_PLATFORM_SUPPORT_HOST_GBM_H_