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

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

Issue 2596443005: Replace DOMWindowProperty in Navigator supplements with ContextClient (Closed)
Patch Set: Created 3 years, 12 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/NavigatorVR.h" 5 #include "modules/vr/NavigatorVR.h"
6 6
7 #include "bindings/core/v8/ScriptPromiseResolver.h" 7 #include "bindings/core/v8/ScriptPromiseResolver.h"
8 #include "core/dom/DOMException.h" 8 #include "core/dom/DOMException.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/dom/DocumentUserGestureToken.h" 10 #include "core/dom/DocumentUserGestureToken.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 Document* NavigatorVR::document() { 85 Document* NavigatorVR::document() {
86 return frame() ? frame()->document() : 0; 86 return frame() ? frame()->document() : 0;
87 } 87 }
88 88
89 DEFINE_TRACE(NavigatorVR) { 89 DEFINE_TRACE(NavigatorVR) {
90 visitor->trace(m_controller); 90 visitor->trace(m_controller);
91 91
92 Supplement<Navigator>::trace(visitor); 92 Supplement<Navigator>::trace(visitor);
93 DOMWindowProperty::trace(visitor); 93 ContextClient::trace(visitor);
94 PageVisibilityObserver::trace(visitor); 94 PageVisibilityObserver::trace(visitor);
95 } 95 }
96 96
97 NavigatorVR::NavigatorVR(LocalFrame* frame) 97 NavigatorVR::NavigatorVR(LocalFrame* frame)
98 : DOMWindowProperty(frame), PageVisibilityObserver(frame->page()) { 98 : ContextClient(frame), PageVisibilityObserver(frame->page()) {
99 frame->domWindow()->registerEventListenerObserver(this); 99 frame->domWindow()->registerEventListenerObserver(this);
100 } 100 }
101 101
102 NavigatorVR::~NavigatorVR() {} 102 NavigatorVR::~NavigatorVR() {}
103 103
104 const char* NavigatorVR::supplementName() { 104 const char* NavigatorVR::supplementName() {
105 return "NavigatorVR"; 105 return "NavigatorVR";
106 } 106 }
107 107
108 void NavigatorVR::enqueueVREvent(VRDisplayEvent* event) { 108 void NavigatorVR::enqueueVREvent(VRDisplayEvent* event) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 154
155 void NavigatorVR::didRemoveAllEventListeners(LocalDOMWindow* window) { 155 void NavigatorVR::didRemoveAllEventListeners(LocalDOMWindow* window) {
156 if (m_controller) { 156 if (m_controller) {
157 m_controller->setListeningForActivate(false); 157 m_controller->setListeningForActivate(false);
158 m_listeningForActivate = false; 158 m_listeningForActivate = false;
159 } 159 }
160 } 160 }
161 161
162 } // namespace blink 162 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/vr/NavigatorVR.h ('k') | third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698