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

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

Issue 2578193004: Remove ActiveScriptWrappableBase::m_scriptWrappable (Closed)
Patch Set: temp 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 } // namespace 64 } // namespace
65 65
66 MediaDevices* MediaDevices::create(ExecutionContext* context) { 66 MediaDevices* MediaDevices::create(ExecutionContext* context) {
67 MediaDevices* mediaDevices = new MediaDevices(context); 67 MediaDevices* mediaDevices = new MediaDevices(context);
68 mediaDevices->suspendIfNeeded(); 68 mediaDevices->suspendIfNeeded();
69 return mediaDevices; 69 return mediaDevices;
70 } 70 }
71 71
72 MediaDevices::MediaDevices(ExecutionContext* context) 72 MediaDevices::MediaDevices(ExecutionContext* context)
73 : ActiveScriptWrappable<MediaDevices>(this), 73 : SuspendableObject(context),
74 SuspendableObject(context),
75 m_observing(false), 74 m_observing(false),
76 m_stopped(false), 75 m_stopped(false),
77 m_dispatchScheduledEventRunner(AsyncMethodRunner<MediaDevices>::create( 76 m_dispatchScheduledEventRunner(AsyncMethodRunner<MediaDevices>::create(
78 this, 77 this,
79 &MediaDevices::dispatchScheduledEvent)) {} 78 &MediaDevices::dispatchScheduledEvent)) {}
80 79
81 MediaDevices::~MediaDevices() {} 80 MediaDevices::~MediaDevices() {}
82 81
83 ScriptPromise MediaDevices::enumerateDevices(ScriptState* scriptState) { 82 ScriptPromise MediaDevices::enumerateDevices(ScriptState* scriptState) {
84 Document* document = toDocument(scriptState->getExecutionContext()); 83 Document* document = toDocument(scriptState->getExecutionContext());
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 246 }
248 247
249 DEFINE_TRACE(MediaDevices) { 248 DEFINE_TRACE(MediaDevices) {
250 visitor->trace(m_dispatchScheduledEventRunner); 249 visitor->trace(m_dispatchScheduledEventRunner);
251 visitor->trace(m_scheduledEvents); 250 visitor->trace(m_scheduledEvents);
252 EventTargetWithInlineData::trace(visitor); 251 EventTargetWithInlineData::trace(visitor);
253 SuspendableObject::trace(visitor); 252 SuspendableObject::trace(visitor);
254 } 253 }
255 254
256 } // namespace blink 255 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698