OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_DRM_CURSOR_PROXY_MOJO_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_CURSOR_PROXY_MOJO_H_ |
6 #define UI_OZONE_PLATFORM_DRM_CURSOR_PROXY_MOJO_H_ | 6 #define UI_OZONE_PLATFORM_DRM_CURSOR_PROXY_MOJO_H_ |
7 | 7 |
8 #include "ui/gfx/native_widget_types.h" | 8 #include "ui/gfx/native_widget_types.h" |
9 #include "ui/ozone/platform/drm/gpu/inter_thread_messaging_proxy.h" | 9 #include "ui/ozone/platform/drm/gpu/inter_thread_messaging_proxy.h" |
10 #include "ui/ozone/platform/drm/host/drm_cursor.h" | 10 #include "ui/ozone/platform/drm/host/drm_cursor.h" |
11 #include "ui/ozone/public/interfaces/device_cursor.mojom.h" | 11 #include "ui/ozone/public/interfaces/device_cursor.mojom.h" |
12 | 12 |
13 namespace shell { | 13 namespace service_manager { |
14 class Connector; | 14 class Connector; |
15 } | 15 } |
16 | 16 |
17 namespace ui { | 17 namespace ui { |
18 | 18 |
19 // Ozone requires a IPC from the browser (or mus-ws) process to the gpu (or | 19 // Ozone requires a IPC from the browser (or mus-ws) process to the gpu (or |
20 // mus-gpu) process to control the mouse pointer. This class provides mouse | 20 // mus-gpu) process to control the mouse pointer. This class provides mouse |
21 // pointer control via Mojo-style IPC. This code runs only in the mus-ws (i.e. | 21 // pointer control via Mojo-style IPC. This code runs only in the mus-ws (i.e. |
22 // it's the client) and sends mouse pointer control messages to a less | 22 // it's the client) and sends mouse pointer control messages to a less |
23 // priviledged process. | 23 // priviledged process. |
24 class CursorProxyMojo : public DrmCursorProxy { | 24 class CursorProxyMojo : public DrmCursorProxy { |
25 public: | 25 public: |
26 explicit CursorProxyMojo(shell::Connector* connector); | 26 explicit CursorProxyMojo(service_manager::Connector* connector); |
27 ~CursorProxyMojo() override; | 27 ~CursorProxyMojo() override; |
28 | 28 |
29 private: | 29 private: |
30 // DrmCursorProxy. | 30 // DrmCursorProxy. |
31 void CursorSet(gfx::AcceleratedWidget window, | 31 void CursorSet(gfx::AcceleratedWidget window, |
32 const std::vector<SkBitmap>& bitmaps, | 32 const std::vector<SkBitmap>& bitmaps, |
33 const gfx::Point& point, | 33 const gfx::Point& point, |
34 int frame_delay_ms) override; | 34 int frame_delay_ms) override; |
35 void Move(gfx::AcceleratedWidget window, const gfx::Point& point) override; | 35 void Move(gfx::AcceleratedWidget window, const gfx::Point& point) override; |
36 void InitializeOnEvdev() override; | 36 void InitializeOnEvdev() override; |
37 | 37 |
38 std::unique_ptr<shell::Connector> connector_; | 38 std::unique_ptr<service_manager::Connector> connector_; |
39 | 39 |
40 // Mojo implementation of the DrmCursorProxy. | 40 // Mojo implementation of the DrmCursorProxy. |
41 ui::ozone::mojom::DeviceCursorPtr main_cursor_ptr_; | 41 ui::ozone::mojom::DeviceCursorPtr main_cursor_ptr_; |
42 ui::ozone::mojom::DeviceCursorPtr evdev_cursor_ptr_; | 42 ui::ozone::mojom::DeviceCursorPtr evdev_cursor_ptr_; |
43 | 43 |
44 base::PlatformThreadRef evdev_ref_; | 44 base::PlatformThreadRef evdev_ref_; |
45 }; | 45 }; |
46 | 46 |
47 } // namespace ui | 47 } // namespace ui |
48 | 48 |
49 #endif // UI_OZONE_PLATFORM_DRM_CURSOR_PROXY_MOJO_H_ | 49 #endif // UI_OZONE_PLATFORM_DRM_CURSOR_PROXY_MOJO_H_ |
OLD | NEW |