summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortdanderson <tdanderson@chromium.org>2016-03-23 09:14:39 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-23 16:16:57 +0000
commitda4111853b1da632bf7566e3505f40ef9cca1a66 (patch)
tree40f702b023d0979b4ce01339403502f805fe33a9
parentdf052b7fede354f92354bd54bc034b0fbc0d42e1 (diff)
downloadchromium_src-da4111853b1da632bf7566e3505f40ef9cca1a66.zip
chromium_src-da4111853b1da632bf7566e3505f40ef9cca1a66.tar.gz
chromium_src-da4111853b1da632bf7566e3505f40ef9cca1a66.tar.bz2
Update documentation in views::ViewTargeterDelegate
Update the class-level documentation of ViewTargeterDelegate as well as the documentation of DoesIntersectRect(). BUG=none TEST=none Review URL: https://codereview.chromium.org/1814853002 Cr-Commit-Position: refs/heads/master@{#382857}
-rw-r--r--ui/views/view_targeter_delegate.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/ui/views/view_targeter_delegate.h b/ui/views/view_targeter_delegate.h
index 0ad461a..44dd839 100644
--- a/ui/views/view_targeter_delegate.h
+++ b/ui/views/view_targeter_delegate.h
@@ -16,7 +16,8 @@ namespace views {
class View;
// Defines the default behaviour for hit-testing and event-targeting against a
-// View using a rectangular region representing an event's location. Views
+// View using a rectangular region representing an event's location (i.e., the
+// bounding box of a gesture or a 1x1 rect in the case of a mouse event). Views
// wishing to define custom hit-testing or event-targeting behaviour do so by
// extending ViewTargeterDelegate and then installing a ViewTargeter on
// themselves.
@@ -25,9 +26,12 @@ class VIEWS_EXPORT ViewTargeterDelegate {
ViewTargeterDelegate() {}
virtual ~ViewTargeterDelegate() {}
- // Returns true if the bounds of |target| intersects |rect|, where |rect|
- // is in the local coodinate space of |target|. Overrides of this method by
- // a View subclass should enforce DCHECK_EQ(this, target).
+ // Returns true if |target| should be considered as a candidate target for
+ // an event having |rect| as its location, where |rect| is in the local
+ // coordinate space of |target|. Overrides of this method by a View subclass
+ // should enforce DCHECK_EQ(this, target).
+ // TODO(tdanderson): Consider changing the name of this method to better
+ // reflect its purpose.
virtual bool DoesIntersectRect(const View* target,
const gfx::Rect& rect) const;