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

Side by Side Diff: third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp

Issue 2675943003: Remove custom left overs from object grouping (Closed)
Patch Set: Rebase (0 changes) Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/remoteplayback/RemotePlayback.h" 5 #include "modules/remoteplayback/RemotePlayback.h"
6 6
7 #include "bindings/core/v8/ScriptPromiseResolver.h" 7 #include "bindings/core/v8/ScriptPromiseResolver.h"
8 #include "bindings/modules/v8/RemotePlaybackAvailabilityCallback.h" 8 #include "bindings/modules/v8/RemotePlaybackAvailabilityCallback.h"
9 #include "core/HTMLNames.h" 9 #include "core/HTMLNames.h"
10 #include "core/dom/DOMException.h" 10 #include "core/dom/DOMException.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 InvalidStateError, "disableRemotePlayback attribute is present.")); 286 InvalidStateError, "disableRemotePlayback attribute is present."));
287 m_promptPromiseResolver = nullptr; 287 m_promptPromiseResolver = nullptr;
288 } 288 }
289 289
290 m_availabilityCallbacks.clear(); 290 m_availabilityCallbacks.clear();
291 291
292 if (m_state != WebRemotePlaybackState::Disconnected) 292 if (m_state != WebRemotePlaybackState::Disconnected)
293 m_mediaElement->requestRemotePlaybackStop(); 293 m_mediaElement->requestRemotePlaybackStop();
294 } 294 }
295 295
296 void RemotePlayback::setV8ReferencesForCallbacks(
297 v8::Isolate* isolate,
298 const v8::Persistent<v8::Object>& wrapper) {
299 for (auto callback : m_availabilityCallbacks.values())
300 callback->setWrapperReference(isolate, wrapper);
301 }
302
303 DEFINE_TRACE(RemotePlayback) { 296 DEFINE_TRACE(RemotePlayback) {
304 visitor->trace(m_availabilityCallbacks); 297 visitor->trace(m_availabilityCallbacks);
305 visitor->trace(m_promptPromiseResolver); 298 visitor->trace(m_promptPromiseResolver);
306 visitor->trace(m_mediaElement); 299 visitor->trace(m_mediaElement);
307 EventTargetWithInlineData::trace(visitor); 300 EventTargetWithInlineData::trace(visitor);
308 } 301 }
309 302
310 DEFINE_TRACE_WRAPPERS(RemotePlayback) { 303 DEFINE_TRACE_WRAPPERS(RemotePlayback) {
311 for (auto callback : m_availabilityCallbacks.values()) { 304 for (auto callback : m_availabilityCallbacks.values()) {
312 visitor->traceWrappers(callback); 305 visitor->traceWrappers(callback);
313 } 306 }
314 EventTargetWithInlineData::traceWrappers(visitor); 307 EventTargetWithInlineData::traceWrappers(visitor);
315 } 308 }
316 309
317 } // namespace blink 310 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698