| 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 #ifndef UI_OZONE_PLATFORM_DRI_GPU_PLATFORM_SUPPORT_GBM_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_GPU_PLATFORM_SUPPORT_GBM_H_ |
| 6 #define UI_OZONE_PLATFORM_DRI_GPU_PLATFORM_SUPPORT_GBM_H_ | 6 #define UI_OZONE_PLATFORM_DRI_GPU_PLATFORM_SUPPORT_GBM_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/scoped_vector.h" |
| 8 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| 9 #include "ui/ozone/public/gpu_platform_support.h" | 11 #include "ui/ozone/public/gpu_platform_support.h" |
| 10 | 12 |
| 11 class SkBitmap; | 13 class SkBitmap; |
| 12 | 14 |
| 13 namespace gfx { | 15 namespace gfx { |
| 14 class Point; | 16 class Point; |
| 15 } | 17 } |
| 16 | 18 |
| 17 namespace ui { | 19 namespace ui { |
| 18 | 20 |
| 19 class DriSurfaceFactory; | 21 class DriSurfaceFactory; |
| 20 | 22 |
| 21 class GpuPlatformSupportGbm : public GpuPlatformSupport { | 23 class GpuPlatformSupportGbm : public GpuPlatformSupport { |
| 22 public: | 24 public: |
| 23 GpuPlatformSupportGbm(DriSurfaceFactory* dri); | 25 GpuPlatformSupportGbm(DriSurfaceFactory* dri); |
| 26 virtual ~GpuPlatformSupportGbm(); |
| 27 |
| 28 void AddHandler(scoped_ptr<GpuPlatformSupport> handler); |
| 24 | 29 |
| 25 // GpuPlatformSupport: | 30 // GpuPlatformSupport: |
| 26 virtual void OnChannelEstablished(IPC::Sender* sender) OVERRIDE; | 31 virtual void OnChannelEstablished(IPC::Sender* sender) OVERRIDE; |
| 27 | 32 |
| 28 // IPC::Listener: | 33 // IPC::Listener: |
| 29 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 34 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 30 | 35 |
| 31 private: | 36 private: |
| 32 IPC::Sender* sender_; | 37 IPC::Sender* sender_; |
| 33 | 38 |
| 34 void OnCursorSet(gfx::AcceleratedWidget widget, | 39 void OnCursorSet(gfx::AcceleratedWidget widget, |
| 35 const SkBitmap& bitmap, | 40 const SkBitmap& bitmap, |
| 36 const gfx::Point& location); | 41 const gfx::Point& location); |
| 37 void OnCursorMove(gfx::AcceleratedWidget widget, const gfx::Point& location); | 42 void OnCursorMove(gfx::AcceleratedWidget widget, const gfx::Point& location); |
| 38 | 43 |
| 39 DriSurfaceFactory* dri_; | 44 DriSurfaceFactory* dri_; |
| 45 ScopedVector<GpuPlatformSupport> handlers_; |
| 40 }; | 46 }; |
| 41 | 47 |
| 42 } // namespace ui | 48 } // namespace ui |
| 43 | 49 |
| 44 #endif // UI_OZONE_PLATFORM_DRI_GPU_PLATFORM_SUPPORT_GBM_H_ | 50 #endif // UI_OZONE_PLATFORM_DRI_GPU_PLATFORM_SUPPORT_GBM_H_ |
| OLD | NEW |