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

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

Issue 2878543002: Refactor VR Shell Input. Locks input to click/scroll targets. (Closed)
Patch Set: Address comments 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 d3addb463b94261b87142b8ea7d9083dfe76ad46..70f582a010ebad098609b967dc7d4919e4f79c8f 100644
--- a/chrome/browser/android/vr_shell/ui_elements/ui_element.cc
+++ b/chrome/browser/android/vr_shell/ui_elements/ui_element.cc
@@ -74,7 +74,7 @@ gfx::Point3F WorldRectangle::GetCenter() const {
}
gfx::PointF WorldRectangle::GetUnitRectangleCoordinates(
- const gfx::Point3F& world_point) {
+ const gfx::Point3F& world_point) const {
// TODO(acondor): Simplify the math in this function.
const vr::Mat4f& transform = transform_.to_world;
gfx::Vector3dF origin =
@@ -116,13 +116,15 @@ void UiElement::Render(VrShellRenderer* renderer,
void UiElement::Initialize() {}
-void UiElement::OnHoverEnter() {}
+void UiElement::OnHoverEnter(gfx::PointF position) {}
void UiElement::OnHoverLeave() {}
-void UiElement::OnButtonDown() {}
+void UiElement::OnMove(gfx::PointF position) {}
-void UiElement::OnButtonUp() {}
+void UiElement::OnButtonDown(gfx::PointF position) {}
+
+void UiElement::OnButtonUp(gfx::PointF position) {}
void UiElement::Animate(const base::TimeTicks& time) {
for (auto& it : animations_) {
« no previous file with comments | « chrome/browser/android/vr_shell/ui_elements/ui_element.h ('k') | chrome/browser/android/vr_shell/ui_elements/url_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698