| 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 | |
| 12 namespace cc { | 8 namespace cc { |
| 13 | 9 |
| 14 class SurfaceDrawQuad; | 10 class SurfaceDrawQuad; |
| 15 | 11 |
| 16 // Clients of SurfaceHittest can provide a SurfaceHittestDelegate implementation | 12 // Clients of SurfaceHittest can provide a SurfaceHittestDelegate implementation |
| 17 // to override the hit target based on metadata outside of the Surfaces system. | 13 // to override the hit target based on metadata outside of the Surfaces system. |
| 18 class SurfaceHittestDelegate { | 14 class SurfaceHittestDelegate { |
| 19 public: | 15 public: |
| 20 // Return true if this delegate rejects this |surface_quad| as a candidate hit | 16 // Return true if this delegate rejects this |surface_quad| as a candidate hit |
| 21 // target. | 17 // target. |
| 22 virtual bool RejectHitTarget(const SurfaceDrawQuad* surface_quad, | 18 virtual bool RejectHitTarget(const SurfaceDrawQuad* surface_quad, |
| 23 const gfx::Point& point_in_quad_space) = 0; | 19 const gfx::Point& point_in_quad_space) = 0; |
| 24 }; | 20 }; |
| 25 | 21 |
| 26 } // namespace cc | 22 } // namespace cc |
| 27 | 23 |
| 28 #endif // CC_SURFACES_SURFACE_HITTEST_DELEGATE_H_ | 24 #endif // CC_SURFACES_SURFACE_HITTEST_DELEGATE_H_ |
| OLD | NEW |