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

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

Issue 2380323003: Refactorings to vr controller code. (Closed)
Patch Set: Fix BUILD.gn Created 4 years, 2 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
« no previous file with comments | « chrome/browser/android/vr_shell/vr_gesture.h ('k') | chrome/browser/android/vr_shell/vr_input_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/vr_input_manager.h
diff --git a/chrome/browser/android/vr_shell/vr_input_manager.h b/chrome/browser/android/vr_shell/vr_input_manager.h
index d8fa1370c4dacf7d4090656ee0c06005dbccca04..34deae06d8b6c830c6ecd3c4603eee9f11751775 100644
--- a/chrome/browser/android/vr_shell/vr_input_manager.h
+++ b/chrome/browser/android/vr_shell/vr_input_manager.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_INPUT_MANAGER_H_
#define CHROME_BROWSER_ANDROID_VR_SHELL_VR_INPUT_MANAGER_H_
+#include "base/memory/ref_counted.h"
+#include "chrome/browser/android/vr_shell/vr_gesture.h"
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
@@ -14,11 +16,12 @@ namespace vr_shell {
class RenderFrameHost;
-class VrInputManager {
+class VrInputManager
+ : public base::RefCountedThreadSafe<VrInputManager> {
public:
explicit VrInputManager(content::WebContents* web_contents);
- ~VrInputManager();
+ void ProcessUpdatedGesture(VrGesture gesture);
void SendScrollEvent(int64_t time_ms,
float x,
@@ -42,9 +45,14 @@ class VrInputManager {
void PinchBy(int64_t time_ms, float x, float y, float delta);
void SendPinchEvent(int64_t time_ms, float x, float y, float dz, int type);
+ protected:
+ friend class base::RefCountedThreadSafe<VrInputManager>;
+ virtual ~VrInputManager();
+
private:
- void SendGestureEvent(const blink::WebGestureEvent& event);
- void SendMouseEvent(const blink::WebMouseEvent& event);
+ void SendGesture(VrGesture gesture);
+ void ForwardGestureEvent(const blink::WebGestureEvent& event);
+ void ForwardMouseEvent(const blink::WebMouseEvent& event);
blink::WebGestureEvent MakeGestureEvent(blink::WebInputEvent::Type type,
int64_t time_ms,
float x,
« no previous file with comments | « chrome/browser/android/vr_shell/vr_gesture.h ('k') | chrome/browser/android/vr_shell/vr_input_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698