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

Unified Diff: chrome/browser/android/vr_shell/ui_elements/ui_element.h

Issue 2878083003: VR Shell: Allow UI elements to determine hit testing. (Closed)
Patch Set: rebase Created 3 years, 7 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
Index: chrome/browser/android/vr_shell/ui_elements/ui_element.h
diff --git a/chrome/browser/android/vr_shell/ui_elements/ui_element.h b/chrome/browser/android/vr_shell/ui_elements/ui_element.h
index b0f980772e4a5f8cd4393f9818c09e9921239a77..d915261c11b6f78e0ea98205d72cbc90ae9d33a9 100644
--- a/chrome/browser/android/vr_shell/ui_elements/ui_element.h
+++ b/chrome/browser/android/vr_shell/ui_elements/ui_element.h
@@ -115,6 +115,13 @@ class UiElement : public WorldRectangle {
virtual void OnMove(gfx::PointF position);
virtual void OnButtonDown(gfx::PointF position);
virtual void OnButtonUp(gfx::PointF position);
+ // Whether the point (relative to the origin of the element), should be
cjgrant 2017/05/15 16:55:09 - Typo at "by considered". - What does "local" mea
mthiesse 2017/05/15 21:11:27 What typo? Clarified the comment and got rid of t
cjgrant 2017/05/15 21:51:52 "All elements are by considered rectangular by def
mthiesse 2017/05/15 22:23:32 I do not see the the problem. fixed ;)
+ // considered on the element. All elements are by considered rectangular by
+ // default. Local points are mapped as follows, though will extend outside the
+ // rectangular bounds of the element:
+ // [(0.0, 0.0), (1.0, 0.0)
+ // (1.0, 0.0), (1.0, 1.0)]
+ virtual bool HitTest(gfx::PointF point) const;
int id() const { return id_; }
void set_id(int id) { id_ = id; }

Powered by Google App Engine
This is Rietveld 408576698