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

Unified Diff: chrome/browser/android/vr_shell/vr_shell_gl.h

Issue 2840183003: VR: Route hover and click events to UI elements. (Closed)
Patch Set: Offer both OnButtonDown() and OnButtonUp(), rather than a combined OnClick() Created 3 years, 8 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/vr_shell_gl.h
diff --git a/chrome/browser/android/vr_shell/vr_shell_gl.h b/chrome/browser/android/vr_shell/vr_shell_gl.h
index 8aa1406723c3562c3da92109401f7173de305c47..18c8ba1113ba55102c6863208fa1997205fd4ae0 100644
--- a/chrome/browser/android/vr_shell/vr_shell_gl.h
+++ b/chrome/browser/android/vr_shell/vr_shell_gl.h
@@ -134,9 +134,9 @@ class VrShellGl : public device::mojom::VRVSyncProvider {
void HandleControllerInput(const gfx::Vector3dF& forward_vector);
void HandleControllerAppButtonActivity(
const gfx::Vector3dF& controller_direction);
- void SendEventsToTarget(InputTarget input_target, int pixel_x, int pixel_y);
- void SendGesture(InputTarget input_target,
- std::unique_ptr<blink::WebInputEvent> event);
+ void SendInputToContent(InputTarget input_target, int pixel_x, int pixel_y);
+ void SendInputToUiElements(UiElement* target_element);
+ void SendGestureToContent(std::unique_ptr<blink::WebInputEvent> event);
void CreateUiSurface();
void OnContentFrameAvailable();
void OnWebVRFrameAvailable();
@@ -190,10 +190,17 @@ class VrShellGl : public device::mojom::VRVSyncProvider {
vr::Quatf controller_quat_;
gfx::Point3F target_point_;
- const UiElement* target_element_ = nullptr;
+
+ // Input targeting for non-content elements.
+ UiElement* target_element_ = nullptr;
+ UiElement* previous_target_element_ = nullptr;
+ UiElement* click_target_element_ = nullptr;
+
+ // Input targeting for the content element.
InputTarget current_input_target_ = InputTarget::NONE;
InputTarget current_scroll_target_ = InputTarget::NONE;
InputTarget current_fling_target_ = InputTarget::NONE;
+
int content_tex_css_width_ = 0;
int content_tex_css_height_ = 0;
gfx::Size content_tex_physical_size_ = {0, 0};
« no previous file with comments | « chrome/browser/android/vr_shell/ui_elements/ui_element.cc ('k') | chrome/browser/android/vr_shell/vr_shell_gl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698