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

Unified Diff: services/ui/public/interfaces/cursor/cursor.mojom

Issue 2786983003: [aura-mus] Add ui::CursorData, with mojo serialization. (Closed)
Patch Set: Enhance the test and comment mojom. Created 3 years, 9 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
Index: services/ui/public/interfaces/cursor/cursor.mojom
diff --git a/services/ui/public/interfaces/cursor.mojom b/services/ui/public/interfaces/cursor/cursor.mojom
similarity index 70%
rename from services/ui/public/interfaces/cursor.mojom
rename to services/ui/public/interfaces/cursor/cursor.mojom
index 0fd34e184b8f92d3f6b65683085ae75e686cd586..ed1940f065f90c3cd0b3966405bc8e74ec7accb8 100644
--- a/services/ui/public/interfaces/cursor.mojom
+++ b/services/ui/public/interfaces/cursor/cursor.mojom
@@ -4,6 +4,9 @@
module ui.mojom;
+import "ui/gfx/geometry/mojo/geometry.mojom";
+import "skia/public/interfaces/bitmap_array.mojom";
+
// Standard Cursor numbers. These are the same as Chrome's ui::Cursor and
// blink's WebCursorInfo.
enum CursorType {
@@ -55,3 +58,18 @@ enum CursorType {
GRABBING,
CUSTOM
};
+
+// A description of a cursor.
+struct CursorData {
+ // The type of cursor. If CUSTOM, the rest of the fields are relevant.
+ CursorType native_type;
sky 2017/03/31 04:57:57 cursor_type?
Elliot Glaysher 2017/03/31 21:18:15 Done.
+
+ // The delay between cursor frames in milliseconds.
+ uint32 frame_delay_ms;
+
+ // The hotspot in cursor frames.
+ gfx.mojom.Point hotspot;
sky 2017/03/31 04:57:57 Is this pixels or dips? Generally if we don't say
Elliot Glaysher 2017/03/31 21:18:15 added "_in_pixels" suffix.
+
+ // The frames of the cursor.
+ skia.mojom.BitmapArray cursor_frames;
sky 2017/03/31 04:57:57 Do cursors vary depending upon dpi? Is it expected
sky 2017/03/31 04:57:57 Would it be better to use shared memory for the bi
Tom Sepez 2017/03/31 16:07:07 Arbitrarily deep? Not sure it matters ...
Elliot Glaysher 2017/03/31 21:18:15 Assuming the user is actually checking IsSameAs()
Elliot Glaysher 2017/03/31 21:18:15 I'm not sure what you're asking here.
Elliot Glaysher 2017/03/31 21:18:15 You're right and I misread this. Added an |image_s
+};

Powered by Google App Engine
This is Rietveld 408576698