Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2092)

Unified Diff: cc/test/surface_hittest_test_helpers.h

Issue 1663433002: Adds an interface to SurfaceHittestDelegate in order to override (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/surfaces/surface_hittest_unittest.cc ('k') | cc/test/surface_hittest_test_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/surface_hittest_test_helpers.h
diff --git a/cc/test/surface_hittest_test_helpers.h b/cc/test/surface_hittest_test_helpers.h
index 4a276592b0e36eac103de1e2973785227384bdf7..e3f8ff9bd3bce6e46322aa9f04269a8447eddd69 100644
--- a/cc/test/surface_hittest_test_helpers.h
+++ b/cc/test/surface_hittest_test_helpers.h
@@ -70,18 +70,25 @@ class TestSurfaceHittestDelegate : public SurfaceHittestDelegate {
TestSurfaceHittestDelegate();
~TestSurfaceHittestDelegate();
- int target_overrides() const { return target_overrides_; }
+ int reject_target_overrides() const { return reject_target_overrides_; }
+ int accept_target_overrides() const { return accept_target_overrides_; }
- void AddInsetsForSurface(const SurfaceId& surface_id,
- const gfx::Insets& inset);
+ void AddInsetsForRejectSurface(const SurfaceId& surface_id,
+ const gfx::Insets& inset);
+ void AddInsetsForAcceptSurface(const SurfaceId& surface_id,
+ const gfx::Insets& inset);
// SurfaceHittestDelegate implementation.
bool RejectHitTarget(const SurfaceDrawQuad* surface_quad,
const gfx::Point& point_in_quad_space) override;
+ bool AcceptHitTarget(const SurfaceDrawQuad* surface_quad,
+ const gfx::Point& point_in_quad_space) override;
private:
- int target_overrides_;
- std::map<SurfaceId, gfx::Insets> insets_for_surface_;
+ int reject_target_overrides_;
+ int accept_target_overrides_;
+ std::map<SurfaceId, gfx::Insets> insets_for_reject_;
+ std::map<SurfaceId, gfx::Insets> insets_for_accept_;
DISALLOW_COPY_AND_ASSIGN(TestSurfaceHittestDelegate);
};
« no previous file with comments | « cc/surfaces/surface_hittest_unittest.cc ('k') | cc/test/surface_hittest_test_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698