Index: content/public/browser/android/vr_input_manager.h |
diff --git a/content/public/browser/android/vr_input_manager.h b/content/public/browser/android/vr_input_manager.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..80ba16669504c88d2085569575ff86fc79c7be35 |
--- /dev/null |
+++ b/content/public/browser/android/vr_input_manager.h |
@@ -0,0 +1,42 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_PUBLIC_BROWSER_ANDROID_VR_INPUT_MANAGER_H_ |
+#define CONTENT_PUBLIC_BROWSER_ANDROID_VR_INPUT_MANAGER_H_ |
+ |
+#include <jni.h> |
+ |
+#include "base/android/scoped_java_ref.h" |
+#include "base/callback.h" |
+#include "base/strings/string16.h" |
+#include "content/common/content_export.h" |
+#include "content/public/browser/android/content_view_core.h" |
+#include "content/public/browser/readback_types.h" |
+ |
+namespace content { |
+ |
+class CONTENT_EXPORT VrInputManager { |
boliu
2016/09/22 16:33:35
why do you need *new* entry points to send input e
mthiesse
2016/09/22 17:13:08
As far as I know there are no existing public entr
mthiesse
2016/09/22 17:19:49
Oh, I wasn't aware of RenderWidgetHost::ForwardGes
boliu
2016/09/22 17:22:25
The normal flow goes through ContentViewCore.on*Ev
mthiesse
2016/09/22 17:28:12
We can't talk directly to ContentViewCoreImpl from
asimjour
2016/09/22 17:34:57
we can add the functionality to content_view_core_
|
+ public: |
+ // Returns the existing ContentViewCore for |web_contents|, or nullptr. |
mthiesse
2016/09/22 16:20:11
update comment.
|
+ static VrInputManager* FromContentViewCore( |
mthiesse
2016/09/22 16:20:12
nit: no need for newline?
|
+ ContentViewCore* content_view_core); |
+ |
+ virtual void SendScrollEvent(long time_ms, |
+ float x, |
+ float y, |
+ float dx, |
+ float dy, |
+ int type) = 0; |
+ |
+ virtual void SendClickEvent(long time_ms, float x, float y) = 0; |
+ |
+ virtual void SendMouseMoveEvent(long time_ms, float x, float y, int type) = 0; |
+ |
+ protected: |
+ ~VrInputManager() {} |
+}; |
+ |
+}; // namespace content |
+ |
+#endif // CONTENT_PUBLIC_BROWSER_ANDROID_VR_INPUT_MANAGER_H_ |