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

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

Issue 2319863005: Implement new compositor and ContentViewCore reparenting for VR Shell. (Closed)
Patch Set: Address Comments Created 4 years, 3 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.h
diff --git a/chrome/browser/android/vr_shell/vr_shell.h b/chrome/browser/android/vr_shell/vr_shell.h
index c06826eafa46bb16d94d3c7406cd9fbdf6f20b10..681cfff95190595ad8201076ff48ed5305c760ef 100644
--- a/chrome/browser/android/vr_shell/vr_shell.h
+++ b/chrome/browser/android/vr_shell/vr_shell.h
@@ -11,10 +11,18 @@
#include "base/android/jni_weak_ref.h"
#include "base/macros.h"
+#include "chrome/browser/android/vr_shell/simple_compositor_view.h"
#include "chrome/browser/android/vr_shell/ui_elements.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr.h"
#include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/gvr_types.h"
+namespace content {
+class ContentViewCore;
+}
+
+namespace ui {
+class WindowAndroid;
+}
namespace vr_shell {
@@ -22,8 +30,12 @@ class VrShellRenderer;
class VrShell {
public:
- VrShell(JNIEnv* env, jobject obj);
+ VrShell(JNIEnv* env, jobject obj,
+ content::ContentViewCore* content_core,
bshe 2016/09/12 16:39:56 nit:s/content_core/content_view_core
mthiesse 2016/09/12 21:46:04 Done.
+ ui::WindowAndroid* content_window);
+ void UpdateCompositorLayers(JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj);
void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
void GvrInit(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
@@ -35,6 +47,16 @@ class VrShell {
void OnPause(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
void OnResume(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
+ void ContentSurfaceDestroyed(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& object);
+ void ContentSurfaceChanged(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& object,
+ jint width,
+ jint height,
+ const base::android::JavaParamRef<jobject>& surface);
+
private:
~VrShell();
void DrawEye(const gvr::Mat4f& view_matrix,
@@ -68,6 +90,9 @@ class VrShell {
gvr::Sizei render_size_;
+ std::unique_ptr<SimpleCompositorView> content_compositor_view_;
+ content::ContentViewCore* content_core_;
bshe 2016/09/12 16:39:56 nit:s/content_core_/content_view_core_
mthiesse 2016/09/12 21:46:04 Done.
+
std::unique_ptr<VrShellRenderer> vr_shell_renderer_;
base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_;

Powered by Google App Engine
This is Rietveld 408576698