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_GBM_H_
6 #define UI_OZONE_PLATFORM_DRI_GPU_PLATFORM_SUPPORT_GBM_H_
8 #include "base/containers/scoped_ptr_hash_map.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/scoped_vector.h"
11 #include "ui/gfx/native_widget_types.h"
12 #include "ui/ozone/public/gpu_platform_support.h"
23 class DriSurfaceFactory;
24 class DriWindowDelegate;
25 class DriWindowDelegateManager;
28 class GpuPlatformSupportGbm : public GpuPlatformSupport {
30 GpuPlatformSupportGbm(DriSurfaceFactory* dri,
31 DriWindowDelegateManager* window_manager,
32 ScreenManager* screen_manager);
33 virtual ~GpuPlatformSupportGbm();
35 void AddHandler(scoped_ptr<GpuPlatformSupport> handler);
37 // GpuPlatformSupport:
38 virtual void OnChannelEstablished(IPC::Sender* sender) OVERRIDE;
41 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
44 void OnCreateWindowDelegate(gfx::AcceleratedWidget widget);
45 void OnDestroyWindowDelegate(gfx::AcceleratedWidget widget);
46 void OnWindowBoundsChanged(gfx::AcceleratedWidget widget,
47 const gfx::Rect& bounds);
48 void OnCursorSet(gfx::AcceleratedWidget widget,
49 const std::vector<SkBitmap>& bitmaps,
50 const gfx::Point& location,
52 void OnCursorMove(gfx::AcceleratedWidget widget, const gfx::Point& location);
55 DriSurfaceFactory* dri_;
56 DriWindowDelegateManager* window_manager_;
57 ScreenManager* screen_manager_;
58 ScopedVector<GpuPlatformSupport> handlers_;
63 #endif // UI_OZONE_PLATFORM_DRI_GPU_PLATFORM_SUPPORT_GBM_H_