Title: [124798] trunk/Source/WebCore
Revision
124798
Author
ann...@chromium.org
Date
2012-08-06 13:41:20 -0700 (Mon, 06 Aug 2012)

Log Message

MediaSource should use it's own list of source URLs
https://bugs.webkit.org/show_bug.cgi?id=93285

Reviewed by Eric Carlson.

r124780 added MediaSource objects to PublicURLManager's streamURLs list,
piggy-backing on MEDIA_STREAM.  This patch creates a sourceURLs list so
that MediaSource can stand on its own.

Test: builds on Andriod even when MEDIA_STREAM is disabled.

* html/DOMURL.cpp:
(WebCore::DOMURL::createObjectURL):
* html/PublicURLManager.h:
(WebCore::PublicURLManager::contextDestroyed):
(PublicURLManager):
(WebCore::PublicURLManager::sourceURLs):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (124797 => 124798)


--- trunk/Source/WebCore/ChangeLog	2012-08-06 20:31:29 UTC (rev 124797)
+++ trunk/Source/WebCore/ChangeLog	2012-08-06 20:41:20 UTC (rev 124798)
@@ -1,3 +1,23 @@
+2012-08-06  Anna Cavender  <ann...@chromium.org>
+
+        MediaSource should use it's own list of source URLs
+        https://bugs.webkit.org/show_bug.cgi?id=93285
+
+        Reviewed by Eric Carlson.
+
+        r124780 added MediaSource objects to PublicURLManager's streamURLs list,
+        piggy-backing on MEDIA_STREAM.  This patch creates a sourceURLs list so
+        that MediaSource can stand on its own.
+
+        Test: builds on Andriod even when MEDIA_STREAM is disabled.
+
+        * html/DOMURL.cpp:
+        (WebCore::DOMURL::createObjectURL):
+        * html/PublicURLManager.h:
+        (WebCore::PublicURLManager::contextDestroyed):
+        (PublicURLManager):
+        (WebCore::PublicURLManager::sourceURLs):
+
 2012-08-06  Nico Weber  <tha...@chromium.org>
 
         [chromium/mac] Unbreak debug builds with the 10.7 SDK

Modified: trunk/Source/WebCore/html/DOMURL.cpp (124797 => 124798)


--- trunk/Source/WebCore/html/DOMURL.cpp	2012-08-06 20:31:29 UTC (rev 124797)
+++ trunk/Source/WebCore/html/DOMURL.cpp	2012-08-06 20:41:20 UTC (rev 124798)
@@ -68,7 +68,7 @@
         return String();
 
     MediaSourceRegistry::registry().registerMediaSourceURL(publicURL, source);
-    scriptExecutionContext->publicURLManager().streamURLs().add(publicURL.string());
+    scriptExecutionContext->publicURLManager().sourceURLs().add(publicURL.string());
 
     return publicURL.string();
 }

Modified: trunk/Source/WebCore/html/PublicURLManager.h (124797 => 124798)


--- trunk/Source/WebCore/html/PublicURLManager.h	2012-08-06 20:31:29 UTC (rev 124797)
+++ trunk/Source/WebCore/html/PublicURLManager.h	2012-08-06 20:41:20 UTC (rev 124798)
@@ -37,6 +37,11 @@
 #include "MediaStreamRegistry.h"
 #endif
 
+#if ENABLE(MEDIA_SOURCE)
+#include "MediaSource.h"
+#include "MediaSourceRegistry.h"
+#endif
+
 namespace WebCore {
 
 class ScriptExecutionContext;
@@ -56,18 +61,29 @@
         for (HashSet<String>::iterator iter = m_streamURLs.begin(); iter != streamURLsEnd; ++iter)
             MediaStreamRegistry::registry().unregisterMediaStreamURL(KURL(ParsedURLString, *iter));
 #endif
+#if ENABLE(MEDIA_SOURCE)
+        HashSet<String>::iterator sourceURLsEnd = m_sourceURLs.end();
+        for (HashSet<String>::iterator iter = m_sourceURLs.begin(); iter != sourceURLsEnd; ++iter)
+            MediaSourceRegistry::registry().unregisterMediaSourceURL(KURL(ParsedURLString, *iter));
+#endif
     }
 
     HashSet<String>& blobURLs() { return m_blobURLs; }
 #if ENABLE(MEDIA_STREAM)
     HashSet<String>& streamURLs() { return m_streamURLs; }
 #endif
+#if ENABLE(MEDIA_SOURCE)
+    HashSet<String>& sourceURLs() { return m_sourceURLs; }
+#endif
 
 private:
     HashSet<String> m_blobURLs;
 #if ENABLE(MEDIA_STREAM)
     HashSet<String> m_streamURLs;
 #endif
+#if ENABLE(MEDIA_SOURCE)
+    HashSet<String> m_sourceURLs;
+#endif
 };
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to