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

Unified Diff: chrome/browser/android/vr_shell/vr_shell.cc

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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/vr_shell/vr_shell.cc
diff --git a/chrome/browser/android/vr_shell/vr_shell.cc b/chrome/browser/android/vr_shell/vr_shell.cc
index 2704107f39f8ccb77ce9870fe9049ad93e3da1ef..b824c141dd47761b75fe71eee5e4796e77e9c735 100644
--- a/chrome/browser/android/vr_shell/vr_shell.cc
+++ b/chrome/browser/android/vr_shell/vr_shell.cc
@@ -102,18 +102,18 @@ class GLThread : public base::Thread {
VrShell::VrShell(JNIEnv* env,
jobject obj,
content::WebContents* main_contents,
- ui::WindowAndroid* content_window,
+ ui::ViewRoot* content_view_root,
content::WebContents* ui_contents,
- ui::WindowAndroid* ui_window,
+ ui::ViewRoot* ui_view_root,
bool for_web_vr,
VrShellDelegate* delegate,
gvr_context* gvr_api,
bool reprojected_rendering)
: WebContentsObserver(ui_contents),
main_contents_(main_contents),
- content_compositor_(new VrCompositor(content_window, false)),
+ content_compositor_(new VrCompositor(content_view_root, false)),
ui_contents_(ui_contents),
- ui_compositor_(new VrCompositor(ui_window, true)),
+ ui_compositor_(new VrCompositor(ui_view_root, true)),
delegate_(delegate),
metrics_helper_(new VrMetricsHelper(main_contents_)),
main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()),
@@ -474,16 +474,16 @@ void VrShell::SetUiCssSize(float width, float height, float dpr) {
jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj,
const JavaParamRef<jobject>& content_web_contents,
- jlong content_window_android,
+ jlong content_view_root,
const JavaParamRef<jobject>& ui_web_contents,
- jlong ui_window_android, jboolean for_web_vr,
+ jlong ui_view_root, jboolean for_web_vr,
const base::android::JavaParamRef<jobject>& delegate,
jlong gvr_api, jboolean reprojected_rendering) {
return reinterpret_cast<intptr_t>(new VrShell(
env, obj, content::WebContents::FromJavaWebContents(content_web_contents),
- reinterpret_cast<ui::WindowAndroid*>(content_window_android),
+ reinterpret_cast<ui::ViewRoot*>(content_view_root),
content::WebContents::FromJavaWebContents(ui_web_contents),
- reinterpret_cast<ui::WindowAndroid*>(ui_window_android),
+ reinterpret_cast<ui::ViewRoot*>(ui_view_root),
for_web_vr, VrShellDelegate::GetNativeDelegate(env, delegate),
reinterpret_cast<gvr_context*>(gvr_api), reprojected_rendering));
}

Powered by Google App Engine
This is Rietveld 408576698