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

Side by Side Diff: chrome/browser/android/vr_shell/vr_shell.h

Issue 2595263002: Introduce ViewRoot forwarding input/view events to native (Closed)
Patch Set: unittest Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 11 matching lines...) Expand all
22 namespace base { 22 namespace base {
23 class ListValue; 23 class ListValue;
24 class Thread; 24 class Thread;
25 } 25 }
26 26
27 namespace content { 27 namespace content {
28 class WebContents; 28 class WebContents;
29 } 29 }
30 30
31 namespace ui { 31 namespace ui {
32 class WindowAndroid; 32 class ViewRoot;
33 } 33 }
34 34
35 namespace vr_shell { 35 namespace vr_shell {
36 36
37 class UiInterface; 37 class UiInterface;
38 class VrCompositor; 38 class VrCompositor;
39 class VrInputManager; 39 class VrInputManager;
40 class VrMetricsHelper; 40 class VrMetricsHelper;
41 class VrShellDelegate; 41 class VrShellDelegate;
42 class VrWebContentsObserver; 42 class VrWebContentsObserver;
43 43
44 enum UiAction { 44 enum UiAction {
45 HISTORY_BACK = 0, 45 HISTORY_BACK = 0,
46 HISTORY_FORWARD, 46 HISTORY_FORWARD,
47 RELOAD, 47 RELOAD,
48 ZOOM_OUT, 48 ZOOM_OUT,
49 ZOOM_IN, 49 ZOOM_IN,
50 RELOAD_UI 50 RELOAD_UI
51 }; 51 };
52 52
53 class VrMetricsHelper; 53 class VrMetricsHelper;
54 54
55 // The native instance of the Java VrShell. This class is not threadsafe and 55 // The native instance of the Java VrShell. This class is not threadsafe and
56 // must only be used on the UI thread. 56 // must only be used on the UI thread.
57 class VrShell : public device::GvrDelegate, content::WebContentsObserver { 57 class VrShell : public device::GvrDelegate, content::WebContentsObserver {
58 public: 58 public:
59 VrShell(JNIEnv* env, jobject obj, 59 VrShell(JNIEnv* env, jobject obj,
60 content::WebContents* main_contents, 60 content::WebContents* main_contents,
61 ui::WindowAndroid* content_window, 61 ui::ViewRoot* content_view_root,
62 content::WebContents* ui_contents, 62 content::WebContents* ui_contents,
63 ui::WindowAndroid* ui_window, 63 ui::ViewRoot* ui_view_root,
64 bool for_web_vr, 64 bool for_web_vr,
65 VrShellDelegate* delegate, 65 VrShellDelegate* delegate,
66 gvr_context* gvr_api, 66 gvr_context* gvr_api,
67 bool reprojected_rendering); 67 bool reprojected_rendering);
68 68
69 void LoadUIContent(JNIEnv* env, 69 void LoadUIContent(JNIEnv* env,
70 const base::android::JavaParamRef<jobject>& obj); 70 const base::android::JavaParamRef<jobject>& obj);
71 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); 71 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
72 void OnTriggerEvent(JNIEnv* env, 72 void OnTriggerEvent(JNIEnv* env,
73 const base::android::JavaParamRef<jobject>& obj); 73 const base::android::JavaParamRef<jobject>& obj);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 base::WeakPtrFactory<VrShell> weak_ptr_factory_; 170 base::WeakPtrFactory<VrShell> weak_ptr_factory_;
171 171
172 DISALLOW_COPY_AND_ASSIGN(VrShell); 172 DISALLOW_COPY_AND_ASSIGN(VrShell);
173 }; 173 };
174 174
175 bool RegisterVrShell(JNIEnv* env); 175 bool RegisterVrShell(JNIEnv* env);
176 176
177 } // namespace vr_shell 177 } // namespace vr_shell
178 178
179 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ 179 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_compositor.cc ('k') | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698