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