OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_VR_INPUT_MANAGER_H_ | |
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_VR_INPUT_MANAGER_H_ | |
7 | |
8 #include <jni.h> | |
9 | |
10 #include "base/android/scoped_java_ref.h" | |
11 #include "base/callback.h" | |
12 #include "base/strings/string16.h" | |
13 #include "content/common/content_export.h" | |
14 #include "content/public/browser/android/content_view_core.h" | |
15 #include "content/public/browser/readback_types.h" | |
16 | |
17 namespace content { | |
18 | |
19 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_
| |
20 public: | |
21 // Returns the existing ContentViewCore for |web_contents|, or nullptr. | |
mthiesse
2016/09/22 16:20:11
update comment.
| |
22 static VrInputManager* FromContentViewCore( | |
mthiesse
2016/09/22 16:20:12
nit: no need for newline?
| |
23 ContentViewCore* content_view_core); | |
24 | |
25 virtual void SendScrollEvent(long time_ms, | |
26 float x, | |
27 float y, | |
28 float dx, | |
29 float dy, | |
30 int type) = 0; | |
31 | |
32 virtual void SendClickEvent(long time_ms, float x, float y) = 0; | |
33 | |
34 virtual void SendMouseMoveEvent(long time_ms, float x, float y, int type) = 0; | |
35 | |
36 protected: | |
37 ~VrInputManager() {} | |
38 }; | |
39 | |
40 }; // namespace content | |
41 | |
42 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_VR_INPUT_MANAGER_H_ | |
OLD | NEW |