| 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 55570f8f3b9e280804584310048828ea30b1305a..553622a0dfa064f16522cfd8694dc7834f1abb48 100644
|
| --- a/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
|
| +++ b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
|
| @@ -9,7 +9,6 @@
|
| #include "core/dom/FrameRequestCallback.h"
|
| #include "core/dom/ScriptedAnimationController.h"
|
| #include "core/dom/TaskRunnerHelper.h"
|
| -#include "core/frame/Frame.h"
|
| #include "core/frame/FrameView.h"
|
| #include "core/frame/ImageBitmap.h"
|
| #include "core/frame/UseCounter.h"
|
| @@ -105,36 +104,8 @@
|
| }
|
| }
|
|
|
| -bool VRDisplay::IsPresentationFocused() {
|
| - if (!navigator_vr_)
|
| - return false;
|
| -
|
| - if (navigator_vr_->IsFocused())
|
| - return true;
|
| -
|
| - auto doc = navigator_vr_->GetDocument();
|
| - if (!doc)
|
| - return false;
|
| -
|
| - // Check if this is an embedded iframe without focus. If a local parent is
|
| - // focused, continue presenting.
|
| -
|
| - Frame* frame = doc->GetFrame();
|
| - for (; frame; frame = frame->Tree().Parent()) {
|
| - if (!frame->IsLocalFrame())
|
| - break;
|
| - auto frame_doc = ToLocalFrame(frame)->GetDocument();
|
| - if (frame_doc && frame_doc->hasFocus()) {
|
| - DVLOG(3) << __FUNCTION__ << ": a parent frame is focused";
|
| - return true;
|
| - }
|
| - }
|
| -
|
| - return false;
|
| -}
|
| -
|
| bool VRDisplay::getFrameData(VRFrameData* frame_data) {
|
| - if (!IsPresentationFocused() || !frame_pose_ || display_blurred_)
|
| + if (!navigator_vr_->IsFocused() || !frame_pose_ || display_blurred_)
|
| return false;
|
|
|
| if (!frame_data)
|
| @@ -776,11 +747,7 @@
|
| }
|
|
|
| void VRDisplay::ConnectVSyncProvider() {
|
| - DVLOG(1) << __FUNCTION__
|
| - << ": IsPresentationFocused()=" << IsPresentationFocused()
|
| - << " vr_v_sync_provider_.is_bound()="
|
| - << vr_v_sync_provider_.is_bound();
|
| - if (!IsPresentationFocused() || vr_v_sync_provider_.is_bound())
|
| + if (!navigator_vr_->IsFocused() || vr_v_sync_provider_.is_bound())
|
| return;
|
| display_->GetVRVSyncProvider(mojo::MakeRequest(&vr_v_sync_provider_));
|
| vr_v_sync_provider_.set_connection_error_handler(ConvertToBaseCallback(
|
|
|