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

Side by Side Diff: chrome/browser/android/vr_shell/vr_shell_delegate.cc

Issue 2624633002: Remove Sync GetPose VRService call, implement VRVSyncProvider (Closed)
Patch Set: 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 #include "chrome/browser/android/vr_shell/vr_shell_delegate.h" 5 #include "chrome/browser/android/vr_shell/vr_shell_delegate.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "chrome/browser/android/vr_shell/vr_shell.h" 8 #include "chrome/browser/android/vr_shell/vr_shell.h"
9 #include "device/vr/android/gvr/gvr_device_provider.h" 9 #include "device/vr/android/gvr/gvr_device_provider.h"
10 #include "jni/VrShellDelegate_jni.h" 10 #include "jni/VrShellDelegate_jni.h"
(...skipping 11 matching lines...) Expand all
22 gvr::GvrApi::WrapNonOwned(reinterpret_cast<gvr_context*>(context)); 22 gvr::GvrApi::WrapNonOwned(reinterpret_cast<gvr_context*>(context));
23 } 23 }
24 24
25 virtual ~GvrNonPresentingDelegate() = default; 25 virtual ~GvrNonPresentingDelegate() = default;
26 26
27 // GvrDelegate implementation 27 // GvrDelegate implementation
28 void SetWebVRSecureOrigin(bool secure_origin) override {} 28 void SetWebVRSecureOrigin(bool secure_origin) override {}
29 void SubmitWebVRFrame() override {} 29 void SubmitWebVRFrame() override {}
30 void UpdateWebVRTextureBounds(const gvr::Rectf& left_bounds, 30 void UpdateWebVRTextureBounds(const gvr::Rectf& left_bounds,
31 const gvr::Rectf& right_bounds) override {} 31 const gvr::Rectf& right_bounds) override {}
32 void SetGvrPoseForWebVr(const gvr::Mat4f& pose,
33 uint32_t pose_index) override {}
34 void SetWebVRRenderSurfaceSize(int width, int height) override {} 32 void SetWebVRRenderSurfaceSize(int width, int height) override {}
35 gvr::Sizei GetWebVRCompositorSurfaceSize() override { 33 gvr::Sizei GetWebVRCompositorSurfaceSize() override {
36 return device::kInvalidRenderTargetSize; } 34 return device::kInvalidRenderTargetSize; }
37 gvr::GvrApi* gvr_api() override { return gvr_api_.get(); } 35 gvr::GvrApi* gvr_api() override { return gvr_api_.get(); }
38 private: 36 private:
39 std::unique_ptr<gvr::GvrApi> gvr_api_; 37 std::unique_ptr<gvr::GvrApi> gvr_api_;
40 }; 38 };
41 39
42 VrShellDelegate::VrShellDelegate(JNIEnv* env, jobject obj) { 40 VrShellDelegate::VrShellDelegate(JNIEnv* env, jobject obj) {
43 j_vr_shell_delegate_.Reset(env, obj); 41 j_vr_shell_delegate_.Reset(env, obj);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 154
157 bool RegisterVrShellDelegate(JNIEnv* env) { 155 bool RegisterVrShellDelegate(JNIEnv* env) {
158 return RegisterNativesImpl(env); 156 return RegisterNativesImpl(env);
159 } 157 }
160 158
161 jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { 159 jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) {
162 return reinterpret_cast<intptr_t>(new VrShellDelegate(env, obj)); 160 return reinterpret_cast<intptr_t>(new VrShellDelegate(env, obj));
163 } 161 }
164 162
165 } // namespace vr_shell 163 } // namespace vr_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698