Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: ui/ozone/platform/drm/host/drm_cursor.h

Issue 1285183008: Ozone integration. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add missing license header Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/drm/host/channel_observer.h ('k') | ui/ozone/platform/drm/host/drm_cursor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/host/drm_cursor.h
diff --git a/ui/ozone/platform/drm/host/drm_cursor.h b/ui/ozone/platform/drm/host/drm_cursor.h
new file mode 100644
index 0000000000000000000000000000000000000000..b747fcb931fcd697388f76b0af06964019ca25bb
--- /dev/null
+++ b/ui/ozone/platform/drm/host/drm_cursor.h
@@ -0,0 +1,64 @@
+// Copyright 2014 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_HOST_DRM_CURSOR_H_
+#define UI_OZONE_PLATFORM_DRM_HOST_DRM_CURSOR_H_
+
+#include "base/callback.h"
+#include "base/logging.h"
+#include "base/memory/ref_counted.h"
+#include "base/single_thread_task_runner.h"
+#include "base/synchronization/lock.h"
+#include "ui/events/ozone/evdev/cursor_delegate_evdev.h"
+#include "ui/gfx/geometry/point_f.h"
+#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/native_widget_types.h"
+#include "ui/ozone/public/gpu_platform_support_host.h"
+#include "ui/platform_window/platform_window.h" // for PlatformCursor
+
+namespace gfx {
+class PointF;
+class Vector2dF;
+class Rect;
+}
+
+namespace ui {
+
+class BitmapCursorOzone;
+class BitmapCursorFactoryOzone;
+class DrmGpuPlatformSupportHost;
+class DrmWindowHostManager;
+
+class DrmCursor : public CursorDelegateEvdev {
+ public:
+ explicit DrmCursor(DrmWindowHostManager* window_manager);
+ ~DrmCursor() override;
+
+ // Change the cursor over the specifed window.
+ void SetCursor(gfx::AcceleratedWidget window, PlatformCursor platform_cursor);
+
+ // Handle window lifecycle.
+ void OnWindowAdded(gfx::AcceleratedWidget window,
+ const gfx::Rect& bounds_in_screen,
+ const gfx::Rect& cursor_confined_bounds);
+ void OnWindowRemoved(gfx::AcceleratedWidget window);
+
+ // Handle window bounds changes.
+ void CommitBoundsChange(gfx::AcceleratedWidget window,
+ const gfx::Rect& new_display_bounds_in_screen,
+ const gfx::Rect& new_confined_bounds);
+
+ // CursorDelegateEvdev:
+ void MoveCursorTo(gfx::AcceleratedWidget window,
+ const gfx::PointF& location) override;
+ void MoveCursorTo(const gfx::PointF& screen_location) override;
+ void MoveCursor(const gfx::Vector2dF& delta) override;
+ bool IsCursorVisible() override;
+ gfx::PointF GetLocation() override;
+ gfx::Rect GetCursorConfinedBounds() override;
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_PLATFORM_DRM_HOST_DRM_CURSOR_H_
« no previous file with comments | « ui/ozone/platform/drm/host/channel_observer.h ('k') | ui/ozone/platform/drm/host/drm_cursor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698