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

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/MediaDevices.cpp

Issue 2547563002: Unflag the MediaDevices devicechange event in Blink. (Closed)
Patch Set: Created 4 years 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/mediastream/MediaDevices.h" 5 #include "modules/mediastream/MediaDevices.h"
6 6
7 #include "bindings/core/v8/ScriptPromise.h" 7 #include "bindings/core/v8/ScriptPromise.h"
8 #include "bindings/core/v8/ScriptPromiseResolver.h" 8 #include "bindings/core/v8/ScriptPromiseResolver.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "core/dom/DOMException.h" 10 #include "core/dom/DOMException.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 137 }
138 138
139 request->start(); 139 request->start();
140 return resolver->promise(); 140 return resolver->promise();
141 } 141 }
142 142
143 void MediaDevices::didChangeMediaDevices() { 143 void MediaDevices::didChangeMediaDevices() {
144 Document* document = toDocument(getExecutionContext()); 144 Document* document = toDocument(getExecutionContext());
145 DCHECK(document); 145 DCHECK(document);
146 146
147 if (RuntimeEnabledFeatures::onDeviceChangeEnabled()) 147 scheduleDispatchEvent(Event::create(EventTypeNames::devicechange));
foolip 2016/12/02 08:48:26 Can you DCHECK(RuntimeEnabledFeatures::onDeviceCha
Guido Urdaneta 2016/12/02 09:31:00 Restored the original since the flag hasn't actual
148 scheduleDispatchEvent(Event::create(EventTypeNames::devicechange));
149 } 148 }
150 149
151 const AtomicString& MediaDevices::interfaceName() const { 150 const AtomicString& MediaDevices::interfaceName() const {
152 return EventTargetNames::MediaDevices; 151 return EventTargetNames::MediaDevices;
153 } 152 }
154 153
155 ExecutionContext* MediaDevices::getExecutionContext() const { 154 ExecutionContext* MediaDevices::getExecutionContext() const {
156 return ActiveDOMObject::getExecutionContext(); 155 return ActiveDOMObject::getExecutionContext();
157 } 156 }
158 157
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 } 248 }
250 249
251 DEFINE_TRACE(MediaDevices) { 250 DEFINE_TRACE(MediaDevices) {
252 visitor->trace(m_dispatchScheduledEventRunner); 251 visitor->trace(m_dispatchScheduledEventRunner);
253 visitor->trace(m_scheduledEvents); 252 visitor->trace(m_scheduledEvents);
254 EventTargetWithInlineData::trace(visitor); 253 EventTargetWithInlineData::trace(visitor);
255 ActiveDOMObject::trace(visitor); 254 ActiveDOMObject::trace(visitor);
256 } 255 }
257 256
258 } // namespace blink 257 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698