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

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

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 753
754 setReadyState(openKeyword()); 754 setReadyState(openKeyword());
755 m_webMediaSource->unmarkEndOfStream(); 755 m_webMediaSource->unmarkEndOfStream();
756 } 756 }
757 757
758 bool MediaSource::hasPendingActivity() const { 758 bool MediaSource::hasPendingActivity() const {
759 return m_attachedElement || m_webMediaSource || 759 return m_attachedElement || m_webMediaSource ||
760 m_asyncEventQueue->hasPendingEvents() || m_addedToRegistryCounter > 0; 760 m_asyncEventQueue->hasPendingEvents() || m_addedToRegistryCounter > 0;
761 } 761 }
762 762
763 void MediaSource::contextDestroyed() { 763 void MediaSource::contextDestroyed(ExecutionContext*) {
764 m_asyncEventQueue->close(); 764 m_asyncEventQueue->close();
765 if (!isClosed()) 765 if (!isClosed())
766 setReadyState(closedKeyword()); 766 setReadyState(closedKeyword());
767 m_webMediaSource.reset(); 767 m_webMediaSource.reset();
768 } 768 }
769 769
770 std::unique_ptr<WebSourceBuffer> MediaSource::createWebSourceBuffer( 770 std::unique_ptr<WebSourceBuffer> MediaSource::createWebSourceBuffer(
771 const String& type, 771 const String& type,
772 const String& codecs, 772 const String& codecs,
773 ExceptionState& exceptionState) { 773 ExceptionState& exceptionState) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 event->setTarget(this); 811 event->setTarget(this);
812 812
813 m_asyncEventQueue->enqueueEvent(event); 813 m_asyncEventQueue->enqueueEvent(event);
814 } 814 }
815 815
816 URLRegistry& MediaSource::registry() const { 816 URLRegistry& MediaSource::registry() const {
817 return MediaSourceRegistry::registry(); 817 return MediaSourceRegistry::registry();
818 } 818 }
819 819
820 } // namespace blink 820 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698