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

Unified Diff: device/vr/android/gvr/gvr_device_provider.cc

Issue 2471433002: Implement WebVR presentation pausing for VR Shell Menu Mode (Closed)
Patch Set: Addressed comments + Fixed rendering issues Created 4 years, 1 month 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: device/vr/android/gvr/gvr_device_provider.cc
diff --git a/device/vr/android/gvr/gvr_device_provider.cc b/device/vr/android/gvr/gvr_device_provider.cc
index 252aa117667e09cce9ca7041c791706dc8c2a220..a24a68c1629b9946ec36f5f2db20701d17b95ab2 100644
--- a/device/vr/android/gvr/gvr_device_provider.cc
+++ b/device/vr/android/gvr/gvr_device_provider.cc
@@ -107,6 +107,28 @@ void GvrDeviceProvider::OnGvrDelegateRemoved() {
ExitPresent();
}
+void GvrDeviceProvider::OnDisplayBlur() {
+ if (!main_thread_task_runner_->BelongsToCurrentThread()) {
+ main_thread_task_runner_->PostTask(
+ FROM_HERE,
+ base::Bind(&GvrDeviceProvider::OnDisplayBlur, base::Unretained(this)));
+ return;
+ }
+ if (client_)
+ client_->OnDisplayBlur(vr_device_.get());
+}
+
+void GvrDeviceProvider::OnDisplayFocus() {
+ if (!main_thread_task_runner_->BelongsToCurrentThread()) {
+ main_thread_task_runner_->PostTask(
+ FROM_HERE,
+ base::Bind(&GvrDeviceProvider::OnDisplayFocus, base::Unretained(this)));
+ return;
+ }
+ if (client_)
+ client_->OnDisplayFocus(vr_device_.get());
+}
+
void GvrDeviceProvider::GvrDelegateReady(GvrDelegate* delegate) {
DCHECK(main_thread_task_runner_->BelongsToCurrentThread());

Powered by Google App Engine
This is Rietveld 408576698