Chromium Code Reviews| 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 a4870e618ba4f50eef7f1c5b818c28c3baf9c063..bb1d94a9904f121d5b1a1547cb209a6798e7802a 100644 |
| --- a/third_party/WebKit/Source/modules/vr/VRDisplay.cpp |
| +++ b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp |
| @@ -104,10 +104,6 @@ bool VRDisplay::getFrameData(VRFrameData* frameData) |
| VRPose* VRDisplay::getPose() |
| { |
| - Document* document = m_navigatorVR->document(); |
| - if (document) |
| - UseCounter::count(*document, UseCounter::VRDeprecatedGetPose); |
|
amp
2016/10/05 20:43:14
Do we not need this counter anymore?
billorr
2016/10/05 21:01:03
I moved it to the IDL, so it will generate a depre
billorr
2016/10/05 22:47:55
Done.
|
| - |
| updatePose(); |
| if (!m_framePose) |
| @@ -161,6 +157,15 @@ void VRDisplay::cancelAnimationFrame(int id) |
| ScriptPromise VRDisplay::requestPresent(ScriptState* scriptState, const HeapVector<VRLayer>& layers) |
| { |
| + ExecutionContext* executionContext = scriptState->getExecutionContext(); |
| + String errorMessage; |
| + if (executionContext->isSecureContext(errorMessage)) { |
|
ddorwin
2016/10/05 21:32:43
ditto
billorr
2016/10/05 21:55:27
Acknowledged.
billorr
2016/10/05 22:47:55
Done.
|
| + UseCounter::count(executionContext, UseCounter::VRRequestPresent); |
| + } else { |
| + UseCounter::count(executionContext, |
| + UseCounter::VRRequestPresentInsecureOrigin); |
| + } |
| + |
| ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState); |
| ScriptPromise promise = resolver->promise(); |