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 <vector> |
| 9 |
| 10 #include "base/memory/scoped_ptr.h" |
8 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
| 12 #include "ui/ozone/common/gpu/ozone_gpu_messages.h" |
9 #include "ui/ozone/public/gpu_platform_support.h" | 13 #include "ui/ozone/public/gpu_platform_support.h" |
10 | 14 |
11 class SkBitmap; | 15 class SkBitmap; |
12 | 16 |
13 namespace gfx { | 17 namespace gfx { |
14 class Point; | 18 class Point; |
15 } | 19 } |
16 | 20 |
17 namespace ui { | 21 namespace ui { |
18 | 22 |
19 class DriSurfaceFactory; | 23 class DriSurfaceFactory; |
20 | 24 |
| 25 #if defined(OS_CHROMEOS) |
| 26 class NativeDisplayDelegateDri; |
| 27 |
| 28 struct DisplayMode_Params; |
| 29 struct DisplaySnapshot_Params; |
| 30 #endif |
| 31 |
21 class GpuPlatformSupportGbm : public GpuPlatformSupport { | 32 class GpuPlatformSupportGbm : public GpuPlatformSupport { |
22 public: | 33 public: |
23 GpuPlatformSupportGbm(DriSurfaceFactory* dri); | 34 GpuPlatformSupportGbm(DriSurfaceFactory* dri); |
24 | 35 |
| 36 #if defined(OS_CHROMEOS) |
| 37 void SetNativeDisplayDelegate(scoped_ptr<NativeDisplayDelegateDri> ndd); |
| 38 #endif |
| 39 |
25 // GpuPlatformSupport: | 40 // GpuPlatformSupport: |
26 virtual void OnChannelEstablished(IPC::Sender* sender) OVERRIDE; | 41 virtual void OnChannelEstablished(IPC::Sender* sender) OVERRIDE; |
27 | 42 |
28 // IPC::Listener: | 43 // IPC::Listener: |
29 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 44 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
30 | 45 |
31 private: | 46 private: |
32 IPC::Sender* sender_; | 47 IPC::Sender* sender_; |
33 | 48 |
34 void OnCursorSet(gfx::AcceleratedWidget widget, | 49 void OnCursorSet(gfx::AcceleratedWidget widget, |
35 const SkBitmap& bitmap, | 50 const SkBitmap& bitmap, |
36 const gfx::Point& location); | 51 const gfx::Point& location); |
37 void OnCursorMove(gfx::AcceleratedWidget widget, const gfx::Point& location); | 52 void OnCursorMove(gfx::AcceleratedWidget widget, const gfx::Point& location); |
38 | 53 |
| 54 #if defined(OS_CHROMEOS) |
| 55 void OnForceDPMSOn(); |
| 56 void OnRefreshNativeDisplays(); |
| 57 void OnConfigureNativeDisplay(int64_t id, |
| 58 const DisplayMode_Params& mode, |
| 59 const gfx::Point& origin); |
| 60 void OnDisableNativeDisplay(int64_t id); |
| 61 #endif |
| 62 |
39 DriSurfaceFactory* dri_; | 63 DriSurfaceFactory* dri_; |
| 64 |
| 65 #if defined(OS_CHROMEOS) |
| 66 scoped_ptr<NativeDisplayDelegateDri> ndd_; |
| 67 #endif |
40 }; | 68 }; |
41 | 69 |
42 } // namespace ui | 70 } // namespace ui |
43 | 71 |
44 #endif // UI_OZONE_PLATFORM_DRI_GPU_PLATFORM_SUPPORT_GBM_H_ | 72 #endif // UI_OZONE_PLATFORM_DRI_GPU_PLATFORM_SUPPORT_GBM_H_ |
OLD | NEW |