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

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

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.cc
diff --git a/chrome/browser/android/vr_shell/ui_elements/ui_element.cc b/chrome/browser/android/vr_shell/ui_elements/ui_element.cc
index 330416e9ba444bf95fd6f21c7a2db4d7fdd99ee3..d47bf5e6250842de984dd2632e2717dd7db3f2bb 100644
--- a/chrome/browser/android/vr_shell/ui_elements/ui_element.cc
+++ b/chrome/browser/android/vr_shell/ui_elements/ui_element.cc
@@ -226,4 +226,9 @@ void UiElement::SetEnabled(bool enabled) {
visible_ = enabled;
}
+bool UiElement::HitTest(gfx::PointF point) const {
+ return point.x() >= 0.0f && point.x() <= 1.0f && point.y() >= 0.0f &&
+ point.y() <= 1.0f;
+}
+
} // namespace vr_shell

Powered by Google App Engine
This is Rietveld 408576698