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

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

Issue 2595263002: Introduce ViewRoot forwarding input/view events to native (Closed)
Patch Set: rebased & ViewAndroud::Bounds 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 b1fe6a972ce10b6ccc885b556a1f2c98ab746918..30164ecc2fed9dd45faf29e9d11a13c2c0964c53 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()),
@@ -476,16 +476,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