| 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 6be80f1bcecd136bd0999d7529f72a73ab27f619..4810e4fa6c24817abeabd72c20f1899c1dfaa14f 100644
|
| --- a/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
|
| +++ b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
|
| @@ -238,6 +238,17 @@ ScriptPromise VRDisplay::requestPresent(ScriptState* scriptState,
|
| return promise;
|
| }
|
|
|
| + // TODO(mthiesse): Remove fullscreen requirement for presentation. See
|
| + // crbug.com/687369
|
| + Document* doc = this->document();
|
| + if (!doc || !Fullscreen::fullscreenEnabled(*doc)) {
|
| + DOMException* exception =
|
| + DOMException::create(InvalidStateError, "Fullscreen is not enabled.");
|
| + resolver->reject(exception);
|
| + ReportPresentationResult(PresentationResult::FullscreenNotEnabled);
|
| + return promise;
|
| + }
|
| +
|
| // A valid number of layers must be provided in order to present.
|
| if (layers.size() == 0 || layers.size() > m_capabilities->maxLayers()) {
|
| forceExitPresent();
|
|
|