OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_SURFACES_SURFACE_HITTEST_DELEGATE_H_ | 5 #ifndef CC_SURFACES_SURFACE_HITTEST_DELEGATE_H_ |
6 #define CC_SURFACES_SURFACE_HITTEST_DELEGATE_H_ | 6 #define CC_SURFACES_SURFACE_HITTEST_DELEGATE_H_ |
7 | 7 |
| 8 namespace gfx { |
| 9 class Point; |
| 10 } // namespace gfx |
| 11 |
8 namespace cc { | 12 namespace cc { |
9 | 13 |
10 class SurfaceDrawQuad; | 14 class SurfaceDrawQuad; |
11 | 15 |
12 // Clients of SurfaceHittest can provide a SurfaceHittestDelegate implementation | 16 // Clients of SurfaceHittest can provide a SurfaceHittestDelegate implementation |
13 // to override the hit target based on metadata outside of the Surfaces system. | 17 // to override the hit target based on metadata outside of the Surfaces system. |
14 class SurfaceHittestDelegate { | 18 class SurfaceHittestDelegate { |
15 public: | 19 public: |
16 // Return true if this delegate rejects this |surface_quad| as a candidate hit | 20 // Return true if this delegate rejects this |surface_quad| as a candidate hit |
17 // target. | 21 // target. |
18 virtual bool RejectHitTarget(const SurfaceDrawQuad* surface_quad, | 22 virtual bool RejectHitTarget(const SurfaceDrawQuad* surface_quad, |
19 const gfx::Point& point_in_quad_space) = 0; | 23 const gfx::Point& point_in_quad_space) = 0; |
20 }; | 24 }; |
21 | 25 |
22 } // namespace cc | 26 } // namespace cc |
23 | 27 |
24 #endif // CC_SURFACES_SURFACE_HITTEST_DELEGATE_H_ | 28 #endif // CC_SURFACES_SURFACE_HITTEST_DELEGATE_H_ |
OLD | NEW |