summaryrefslogtreecommitdiffstats
path: root/cc/surfaces/surface_hittest_delegate.h
diff options
context:
space:
mode:
Diffstat (limited to 'cc/surfaces/surface_hittest_delegate.h')
-rw-r--r--cc/surfaces/surface_hittest_delegate.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/cc/surfaces/surface_hittest_delegate.h b/cc/surfaces/surface_hittest_delegate.h
new file mode 100644
index 0000000..1f0fbf9
--- /dev/null
+++ b/cc/surfaces/surface_hittest_delegate.h
@@ -0,0 +1,24 @@
+// Copyright 2015 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.
+
+#ifndef CC_SURFACES_SURFACE_HITTEST_DELEGATE_H_
+#define CC_SURFACES_SURFACE_HITTEST_DELEGATE_H_
+
+namespace cc {
+
+class SurfaceDrawQuad;
+
+// Clients of SurfaceHittest can provide a SurfaceHittestDelegate implementation
+// to override the hit target based on metadata outside of the Surfaces system.
+class SurfaceHittestDelegate {
+ public:
+ // Return true if this delegate rejects this |surface_quad| as a candidate hit
+ // target.
+ virtual bool RejectHitTarget(const SurfaceDrawQuad* surface_quad,
+ const gfx::Point& point_in_quad_space) = 0;
+};
+
+} // namespace cc
+
+#endif // CC_SURFACES_SURFACE_HITTEST_DELEGATE_H_