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