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

Side by Side Diff: Source/modules/mediasource/MediaSource.cpp

Issue 360323002: MediaSource must use ref-counting to handle pending activity counting. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Revert HTMLMediaElement changes Created 6 years, 5 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 83
84 const AtomicString& MediaSource::endedKeyword() 84 const AtomicString& MediaSource::endedKeyword()
85 { 85 {
86 DEFINE_STATIC_LOCAL(const AtomicString, ended, ("ended", AtomicString::Const ructFromLiteral)); 86 DEFINE_STATIC_LOCAL(const AtomicString, ended, ("ended", AtomicString::Const ructFromLiteral));
87 return ended; 87 return ended;
88 } 88 }
89 89
90 MediaSource* MediaSource::create(ExecutionContext* context) 90 MediaSource* MediaSource::create(ExecutionContext* context)
91 { 91 {
92 MediaSource* mediaSource(adoptRefCountedGarbageCollectedWillBeNoop(new Media Source(context))); 92 MediaSource* mediaSource(adoptRefCountedGarbageCollected(new MediaSource(con text)));
93 mediaSource->suspendIfNeeded(); 93 mediaSource->suspendIfNeeded();
94 return mediaSource; 94 return mediaSource;
95 } 95 }
96 96
97 MediaSource::MediaSource(ExecutionContext* context) 97 MediaSource::MediaSource(ExecutionContext* context)
98 : ActiveDOMObject(context) 98 : ActiveDOMObject(context)
99 , m_readyState(closedKeyword()) 99 , m_readyState(closedKeyword())
100 , m_asyncEventQueue(GenericEventQueue::create(this)) 100 , m_asyncEventQueue(GenericEventQueue::create(this))
101 , m_attachedElement(0) 101 , m_attachedElement(0)
102 , m_sourceBuffers(SourceBufferList::create(executionContext(), m_asyncEventQ ueue.get())) 102 , m_sourceBuffers(SourceBufferList::create(executionContext(), m_asyncEventQ ueue.get()))
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 540
541 m_asyncEventQueue->enqueueEvent(event.release()); 541 m_asyncEventQueue->enqueueEvent(event.release());
542 } 542 }
543 543
544 URLRegistry& MediaSource::registry() const 544 URLRegistry& MediaSource::registry() const
545 { 545 {
546 return MediaSourceRegistry::registry(); 546 return MediaSourceRegistry::registry();
547 } 547 }
548 548
549 } // namespace WebCore 549 } // namespace WebCore
OLDNEW
« Source/modules/mediasource/MediaSource.h ('K') | « Source/modules/mediasource/MediaSource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698