Index: ui/ozone/platform/drm/cursor_proxy_mojo.h |
diff --git a/ui/ozone/platform/drm/cursor_proxy_mojo.h b/ui/ozone/platform/drm/cursor_proxy_mojo.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c9702cb6075bca878febdbad0b3c2e8cd4343237 |
--- /dev/null |
+++ b/ui/ozone/platform/drm/cursor_proxy_mojo.h |
@@ -0,0 +1,51 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_OZONE_PLATFORM_DRM_CURSOR_PROXY_MOJO_H_ |
+#define UI_OZONE_PLATFORM_DRM_CURSOR_PROXY_MOJO_H_ |
+ |
+#include "ui/gfx/native_widget_types.h" |
+#include "ui/ozone/platform/drm/gpu/inter_thread_messaging_proxy.h" |
+#include "ui/ozone/platform/drm/host/drm_cursor.h" |
+#include "ui/ozone/public/interfaces/cursor.mojom.h" |
+ |
+namespace base { |
+class SingleThreadTaskRunner; |
Tom Sepez
2016/07/19 16:14:38
nit: is this required? I didn't see it used in th
rjkroege
2016/07/21 01:10:41
Done.
|
+} |
+ |
+namespace shell { |
+class Connector; |
+} |
+ |
+namespace ui { |
+ |
+// Ozone requires a IPC from the browser (or mus-ws) process to the gpu (or |
+// mus-gpu) process to control the mouse pointer. This class provides mouse |
+// pointer control via Mojo-style IPC. This code runs only in the mus-ws (i.e. |
+// it's the client) and sends mount pointer control messages to a less |
Tom Sepez
2016/07/19 16:14:38
nit: mouse (sp)
rjkroege
2016/07/21 01:10:41
Done.
|
+// priviledged process. |
+class CursorProxyMojo : public DrmCursorProxy { |
+ public: |
+ CursorProxyMojo(shell::Connector* connector); |
Tom Sepez
2016/07/19 16:14:38
nit: explicit
rjkroege
2016/07/21 01:10:41
Done.
|
+ ~CursorProxyMojo() override; |
+ |
+ private: |
+ // DrmCursorProxy. |
+ void CursorSet(gfx::AcceleratedWidget window, |
+ const std::vector<SkBitmap>& bitmaps, |
+ const gfx::Point& point, |
+ int frame_delay_ms) override; |
+ void Move(gfx::AcceleratedWidget window, const gfx::Point& point) override; |
+ void InitializeOnEvdev() override; |
+ |
+ std::unique_ptr<shell::Connector> connector_; |
+ |
+ // Mojo implementation of the DrmCursorProxy. |
+ ui::ozone::mojom::CursorPtr main_cursor_ptr_; |
+ ui::ozone::mojom::CursorPtr evdev_cursor_ptr_; |
+}; |
+ |
+} // namespace ui |
+ |
+#endif // UI_OZONE_PLATFORM_DRM_CURSOR_PROXY_MOJO_H_ |