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

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

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 } 744 }
745 745
746 ExecutionContext* VRDisplay::getExecutionContext() const { 746 ExecutionContext* VRDisplay::getExecutionContext() const {
747 return ContextLifecycleObserver::getExecutionContext(); 747 return ContextLifecycleObserver::getExecutionContext();
748 } 748 }
749 749
750 const AtomicString& VRDisplay::interfaceName() const { 750 const AtomicString& VRDisplay::interfaceName() const {
751 return EventTargetNames::VRDisplay; 751 return EventTargetNames::VRDisplay;
752 } 752 }
753 753
754 void VRDisplay::contextDestroyed() { 754 void VRDisplay::contextDestroyed(ExecutionContext*) {
755 forceExitPresent(); 755 forceExitPresent();
756 } 756 }
757 757
758 bool VRDisplay::hasPendingActivity() const { 758 bool VRDisplay::hasPendingActivity() const {
759 // Prevent V8 from garbage collecting the wrapper object if there are 759 // Prevent V8 from garbage collecting the wrapper object if there are
760 // event listeners attached to it. 760 // event listeners attached to it.
761 return getExecutionContext() && hasEventListeners(); 761 return getExecutionContext() && hasEventListeners();
762 } 762 }
763 763
764 DEFINE_TRACE(VRDisplay) { 764 DEFINE_TRACE(VRDisplay) {
765 EventTargetWithInlineData::trace(visitor); 765 EventTargetWithInlineData::trace(visitor);
766 ContextLifecycleObserver::trace(visitor); 766 ContextLifecycleObserver::trace(visitor);
767 visitor->trace(m_navigatorVR); 767 visitor->trace(m_navigatorVR);
768 visitor->trace(m_capabilities); 768 visitor->trace(m_capabilities);
769 visitor->trace(m_stageParameters); 769 visitor->trace(m_stageParameters);
770 visitor->trace(m_eyeParametersLeft); 770 visitor->trace(m_eyeParametersLeft);
771 visitor->trace(m_eyeParametersRight); 771 visitor->trace(m_eyeParametersRight);
772 visitor->trace(m_layer); 772 visitor->trace(m_layer);
773 visitor->trace(m_renderingContext); 773 visitor->trace(m_renderingContext);
774 visitor->trace(m_scriptedAnimationController); 774 visitor->trace(m_scriptedAnimationController);
775 visitor->trace(m_pendingPresentResolvers); 775 visitor->trace(m_pendingPresentResolvers);
776 } 776 }
777 777
778 } // namespace blink 778 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRDisplay.h ('k') | third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698