Index: components/viz/hit_test/public/interfaces/hit_test_data.mojom |
diff --git a/components/viz/hit_test/public/interfaces/hit_test_data.mojom b/components/viz/hit_test/public/interfaces/hit_test_data.mojom |
new file mode 100644 |
index 0000000000000000000000000000000000000000..73dde0547d6af7919bdc09374a66e6477d33be28 |
--- /dev/null |
+++ b/components/viz/hit_test/public/interfaces/hit_test_data.mojom |
@@ -0,0 +1,52 @@ |
+// Copyright 2017 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. |
+ |
+module viz.hit_test.mojom; |
+ |
+import "cc/ipc/surface_id.mojom"; |
+import "ui/gfx/geometry/mojo/geometry.mojom"; |
+import "ui/gfx/mojo/transform.mojom"; |
+ |
+enum HitTestRegionFlags { |
+ |
+ // Region maps to this surface ( me ). |
rjkroege
2017/06/09 15:47:08
The bounds flag is still necessary. Please put it
|
+ HIT_TEST_MINE = 0, |
+ |
+ // Region ignored for hit testing ( transparent backgrounds & hover:none ). |
+ HIT_TEST_IGNORE, |
+ |
+ // Region maps to child surface ( OOPIF ). |
+ HIT_TEST_CHILD_SURFACE, |
+ |
+ // Irregular boundary - send HitTestRequest to resolve. |
+ HIT_TEST_ASK, |
+ |
+ // No touch event handler exists - no need to send touch events. |
+ HIT_TEST_NO_TOUCH_EVENT_HANDLER, |
+ |
+}; |
+ |
+struct HitTestRegion { |
+ |
+ // Flags to indicate the type of HitTestRegion. |
+ HitTestRegionFlags flags_; |
+ |
+ // SurfaceId is required when flags_ = HIT_TEST_CHILD_SURFACE. |
+ cc.mojom.SurfaceId surface_id_; |
+ |
+ // The rect of the region in the coordinate space of the embedder. |
+ gfx.mojom.Rect rect_; |
+ |
+ // The transform applied to the child region. |
+ gfx.mojom.Transform transform_; |
+}; |
+ |
+struct HitTestData { |
+ |
+ // SurfaceId corresponding to this HitTestData. |
+ cc.mojom.SurfaceId surface_id_; |
+ |
+ // The list of sub-regions in this surface. |
+ array<HitTestRegion> regions_; // in front to back z-order |
+}; |