Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
|
danakj
2017/07/13 15:39:39
These services files should all be under services/
gklassen
2017/07/13 19:59:15
Done.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 module viz.hit_test.mojom; | |
|
Fady Samuel
2017/07/13 15:15:31
nit: per offline discussion with danakj, viz.mojom
danakj
2017/07/13 15:39:39
I think this should be just viz.mojom
gklassen
2017/07/13 19:59:15
Done.
| |
| 6 | |
| 7 import "cc/ipc/surface_id.mojom"; | |
| 8 import "ui/gfx/geometry/mojo/geometry.mojom"; | |
| 9 import "ui/gfx/mojo/transform.mojom"; | |
| 10 | |
| 11 // Region maps to this surface (me). | |
| 12 const uint32 kHitTestMine = 0x01; | |
| 13 | |
| 14 // Region ignored for hit testing (transparent backgrounds & hover:none). | |
| 15 const uint32 kHitTestIgnore = 0x02; | |
| 16 | |
| 17 // Region maps to child surface (OOPIF). | |
| 18 const uint32 kHitTestChildSurface = 0x04; | |
| 19 | |
| 20 // Irregular boundary - send HitTestRequest to resolve. | |
| 21 const uint32 kHitTestAsk = 0x08; | |
| 22 | |
| 23 // Touch event handler exists. | |
| 24 const uint32 kHitTestTouchEventHandler = 0x10; | |
| 25 | |
| 26 struct HitTestRegion { | |
| 27 // Flags to indicate the type of HitTestRegion. | |
| 28 uint32 flags; | |
| 29 | |
| 30 // SurfaceId is required when flags = kHitTestChildSurface. | |
| 31 cc.mojom.SurfaceId surface_id; | |
| 32 | |
| 33 // The rect of the region in the coordinate space of the embedder. | |
| 34 gfx.mojom.Rect rect; | |
| 35 | |
| 36 // The transform of the region. The transform applied to the rect | |
| 37 // defines the space occupied by this region in the coordinate space of | |
| 38 // the embedder. | |
| 39 gfx.mojom.Transform transform; | |
| 40 }; | |
| 41 | |
| 42 struct HitTestRegionList { | |
| 43 // SurfaceId corresponding to this HitTestData. | |
| 44 cc.mojom.SurfaceId surface_id; | |
| 45 | |
| 46 // Flags indicate how to handle events that match no sub-regions. | |
| 47 // kHitTestMine routes un-matched events to this surface (opaque). | |
| 48 // kHitTestIgnore keeps previous match in the parent (transparent). | |
| 49 uint32 flags; | |
| 50 | |
| 51 // The bounds of the surface. | |
| 52 gfx.mojom.Rect bounds; | |
| 53 | |
| 54 // The transform applied to all regions in this surface. | |
| 55 gfx.mojom.Transform transform; | |
| 56 | |
| 57 // The list of sub-regions in front to back order. | |
| 58 array<HitTestRegion> regions; | |
| 59 }; | |
| OLD | NEW |