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

Unified Diff: third_party/WebKit/Source/modules/vr/VRDisplay.cpp

Issue 2783993002: Send vrdisplayactivate to the most recently focused navigator listening for displayactivate. (Closed)
Patch Set: Created 3 years, 9 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 | « third_party/WebKit/Source/modules/vr/VRDisplay.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/vr/VRDisplay.cpp
diff --git a/third_party/WebKit/Source/modules/vr/VRDisplay.cpp b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
index 6f13f70e67a81d7f10850cbfc01f761ef2435a06..aefe6ba06a1ae6aa1a7dbdc53f6007cef3f2d883 100644
--- a/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
+++ b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
@@ -681,8 +681,6 @@ void VRDisplay::stopPresenting() {
}
void VRDisplay::OnActivate(device::mojom::blink::VRDisplayEventReason reason) {
- if (!m_navigatorVR->isFocused() || m_displayBlurred)
- return;
AutoReset<bool> activating(&m_inDisplayActivate, true);
m_navigatorVR->dispatchVREvent(VRDisplayEvent::create(
EventTypeNames::vrdisplayactivate, true, false, this, reason));
@@ -713,6 +711,7 @@ void VRDisplay::OnVSync(device::mojom::blink::VRPosePtr pose,
mojo::common::mojom::blink::TimeDeltaPtr time,
int16_t frameId,
device::mojom::blink::VRVSyncProvider::Status error) {
+ m_VSyncConnectionFailed = false;
switch (error) {
case device::mojom::blink::VRVSyncProvider::Status::SUCCESS:
break;
@@ -760,7 +759,10 @@ void VRDisplay::ConnectVSyncProvider() {
void VRDisplay::OnVSyncConnectionError() {
m_vrVSyncProvider.reset();
+ if (m_VSyncConnectionFailed)
+ return;
ConnectVSyncProvider();
+ m_VSyncConnectionFailed = true;
}
ScriptedAnimationController& VRDisplay::ensureScriptedAnimationController(
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRDisplay.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698