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

Side by Side Diff: third_party/WebKit/Source/modules/vr/VRDisplay.cpp

Issue 2743023002: Migrate WTF::Deque::append() to ::push_back() (Closed)
Patch Set: rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/vr/VRDisplay.h" 5 #include "modules/vr/VRDisplay.h"
6 6
7 #include "core/css/StylePropertySet.h" 7 #include "core/css/StylePropertySet.h"
8 #include "core/dom/DOMException.h" 8 #include "core/dom/DOMException.h"
9 #include "core/dom/DocumentUserGestureToken.h" 9 #include "core/dom/DocumentUserGestureToken.h"
10 #include "core/dom/FrameRequestCallback.h" 10 #include "core/dom/FrameRequestCallback.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 "Layer bounds must either be an empty array or have 4 values"); 291 "Layer bounds must either be an empty array or have 4 values");
292 resolver->reject(exception); 292 resolver->reject(exception);
293 ReportPresentationResult(PresentationResult::InvalidLayerBounds); 293 ReportPresentationResult(PresentationResult::InvalidLayerBounds);
294 return promise; 294 return promise;
295 } 295 }
296 296
297 if (!m_pendingPresentResolvers.isEmpty()) { 297 if (!m_pendingPresentResolvers.isEmpty()) {
298 // If we are waiting on the results of a previous requestPresent call don't 298 // If we are waiting on the results of a previous requestPresent call don't
299 // fire a new request, just cache the resolver and resolve it when the 299 // fire a new request, just cache the resolver and resolve it when the
300 // original request returns. 300 // original request returns.
301 m_pendingPresentResolvers.append(resolver); 301 m_pendingPresentResolvers.push_back(resolver);
302 } else if (firstPresent) { 302 } else if (firstPresent) {
303 bool secureContext = scriptState->getExecutionContext()->isSecureContext(); 303 bool secureContext = scriptState->getExecutionContext()->isSecureContext();
304 if (!m_display) { 304 if (!m_display) {
305 forceExitPresent(); 305 forceExitPresent();
306 DOMException* exception = DOMException::create( 306 DOMException* exception = DOMException::create(
307 InvalidStateError, "The service is no longer active."); 307 InvalidStateError, "The service is no longer active.");
308 resolver->reject(exception); 308 resolver->reject(exception);
309 return promise; 309 return promise;
310 } 310 }
311 311
312 m_pendingPresentResolvers.append(resolver); 312 m_pendingPresentResolvers.push_back(resolver);
313 m_submit_frame_client_binding.Close(); 313 m_submit_frame_client_binding.Close();
314 m_display->RequestPresent( 314 m_display->RequestPresent(
315 secureContext, 315 secureContext,
316 m_submit_frame_client_binding.CreateInterfacePtrAndBind(), 316 m_submit_frame_client_binding.CreateInterfacePtrAndBind(),
317 convertToBaseCallback( 317 convertToBaseCallback(
318 WTF::bind(&VRDisplay::onPresentComplete, wrapPersistent(this)))); 318 WTF::bind(&VRDisplay::onPresentComplete, wrapPersistent(this))));
319 } else { 319 } else {
320 updateLayerBounds(); 320 updateLayerBounds();
321 resolver->resolve(); 321 resolver->resolve();
322 ReportPresentationResult(PresentationResult::SuccessAlreadyPresenting); 322 ReportPresentationResult(PresentationResult::SuccessAlreadyPresenting);
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 visitor->trace(m_stageParameters); 778 visitor->trace(m_stageParameters);
779 visitor->trace(m_eyeParametersLeft); 779 visitor->trace(m_eyeParametersLeft);
780 visitor->trace(m_eyeParametersRight); 780 visitor->trace(m_eyeParametersRight);
781 visitor->trace(m_layer); 781 visitor->trace(m_layer);
782 visitor->trace(m_renderingContext); 782 visitor->trace(m_renderingContext);
783 visitor->trace(m_scriptedAnimationController); 783 visitor->trace(m_scriptedAnimationController);
784 visitor->trace(m_pendingPresentResolvers); 784 visitor->trace(m_pendingPresentResolvers);
785 } 785 }
786 786
787 } // namespace blink 787 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRController.cpp ('k') | third_party/WebKit/Source/modules/webdatabase/Database.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698