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

Side by Side Diff: device/vr/android/gvr/gvr_device_provider.cc

Issue 2361533003: Expose secure origin state to WebVR renderer (Closed)
Patch Set: Rebase 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 unified diff | Download patch
« no previous file with comments | « device/vr/android/gvr/gvr_device.cc ('k') | device/vr/vr_device.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "device/vr/android/gvr/gvr_device_provider.h" 5 #include "device/vr/android/gvr/gvr_device_provider.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 8
9 #include "base/android/context_utils.h" 9 #include "base/android/context_utils.h"
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void Shutdown() { 51 void Shutdown() {
52 if (!j_device_.is_null()) { 52 if (!j_device_.is_null()) {
53 gvr_api_ = nullptr; 53 gvr_api_ = nullptr;
54 JNIEnv* env = AttachCurrentThread(); 54 JNIEnv* env = AttachCurrentThread();
55 Java_GvrDeviceProvider_shutdown(env, j_device_.obj()); 55 Java_GvrDeviceProvider_shutdown(env, j_device_.obj());
56 j_device_ = nullptr; 56 j_device_ = nullptr;
57 } 57 }
58 } 58 }
59 59
60 // GvrDelegate implementation 60 // GvrDelegate implementation
61 void SetWebVRSecureOrigin(bool secure_origin) override {}
61 void SubmitWebVRFrame() override {} 62 void SubmitWebVRFrame() override {}
62 void UpdateWebVRTextureBounds(int eye, 63 void UpdateWebVRTextureBounds(int eye,
63 float left, 64 float left,
64 float top, 65 float top,
65 float width, 66 float width,
66 float height) override {} 67 float height) override {}
67 68
68 gvr::GvrApi* gvr_api() override { return gvr_api_.get(); } 69 gvr::GvrApi* gvr_api() override { return gvr_api_.get(); }
69 70
70 private: 71 private:
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 base::Bind(&GvrDeviceProvider::ExitPresent, base::Unretained(this))); 150 base::Bind(&GvrDeviceProvider::ExitPresent, base::Unretained(this)));
150 } 151 }
151 152
152 void GvrDeviceProvider::GvrDelegateReady(GvrDelegate* delegate) { 153 void GvrDeviceProvider::GvrDelegateReady(GvrDelegate* delegate) {
153 DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); 154 DCHECK(main_thread_task_runner_->BelongsToCurrentThread());
154 155
155 vr_device_->SetDelegate(delegate); 156 vr_device_->SetDelegate(delegate);
156 } 157 }
157 158
158 } // namespace device 159 } // namespace device
OLDNEW
« no previous file with comments | « device/vr/android/gvr/gvr_device.cc ('k') | device/vr/vr_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698