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

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

Issue 2343023002: Switch WebVR to handle GvrApi management through VrShellDelegate (Closed)
Patch Set: Renamed onNativeLibraryReady to initializeNative 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
« no previous file with comments | « chrome/browser/android/vr_shell/BUILD.gn ('k') | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8ad2e044a44c0ad6da5aaa0dfeffe49bb63aa6fc..4077684d68f7f1d3c170d33c90dd127930d7b3c9 100644
--- a/chrome/browser/android/vr_shell/vr_shell.h
+++ b/chrome/browser/android/vr_shell/vr_shell.h
@@ -27,6 +27,7 @@ class WindowAndroid;
namespace vr_shell {
class VrCompositor;
+class VrShellDelegate;
class VrShellRenderer;
@@ -39,6 +40,9 @@ class VrShell : public device::GvrDelegate {
void UpdateCompositorLayers(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj);
void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
+ void SetDelegate(JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj,
+ const base::android::JavaParamRef<jobject>& delegate);
void GvrInit(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
jlong native_gvr_api);
@@ -48,10 +52,11 @@ class VrShell : public device::GvrDelegate {
void DrawFrame(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
void OnPause(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
void OnResume(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
+ void SetWebVrMode(JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj,
+ bool enabled);
- // GvrDelegate
- void RequestWebVRPresent() override;
- void ExitWebVRPresent() override;
+ // device::GvrDelegate implementation
void SubmitWebVRFrame() override;
void UpdateWebVRTextureBounds(
int eye, float left, float top, float width, float height) override;
@@ -109,6 +114,7 @@ class VrShell : public device::GvrDelegate {
std::unique_ptr<VrCompositor> content_compositor_view_;
content::ContentViewCore* content_cvc_;
+ VrShellDelegate* delegate_;
std::unique_ptr<VrShellRenderer> vr_shell_renderer_;
base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_;
« no previous file with comments | « chrome/browser/android/vr_shell/BUILD.gn ('k') | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698