| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Motorola Mobility Inc. | 2 * Copyright (C) 2012 Motorola Mobility Inc. |
| 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "PlatformString.h" | 30 #include "PlatformString.h" |
| 31 #include "ScriptExecutionContext.h" | 31 #include "ScriptExecutionContext.h" |
| 32 #include "ThreadableBlobRegistry.h" | 32 #include "ThreadableBlobRegistry.h" |
| 33 #include <wtf/HashSet.h> | 33 #include <wtf/HashSet.h> |
| 34 | 34 |
| 35 #if ENABLE(MEDIA_STREAM) | 35 #if ENABLE(MEDIA_STREAM) |
| 36 #include "MediaStream.h" | 36 #include "MediaStream.h" |
| 37 #include "MediaStreamRegistry.h" | 37 #include "MediaStreamRegistry.h" |
| 38 #endif | 38 #endif |
| 39 | 39 |
| 40 #if ENABLE(MEDIA_SOURCE) | |
| 41 #include "MediaSource.h" | |
| 42 #include "MediaSourceRegistry.h" | |
| 43 #endif | |
| 44 | |
| 45 namespace WebCore { | 40 namespace WebCore { |
| 46 | 41 |
| 47 class ScriptExecutionContext; | 42 class ScriptExecutionContext; |
| 48 | 43 |
| 49 class PublicURLManager { | 44 class PublicURLManager { |
| 50 | 45 |
| 51 public: | 46 public: |
| 52 static PassOwnPtr<PublicURLManager> create() { return adoptPtr(new PublicURL
Manager); } | 47 static PassOwnPtr<PublicURLManager> create() { return adoptPtr(new PublicURL
Manager); } |
| 53 void contextDestroyed() | 48 void contextDestroyed() |
| 54 { | 49 { |
| 55 HashSet<String>::iterator blobURLsEnd = m_blobURLs.end(); | 50 HashSet<String>::iterator blobURLsEnd = m_blobURLs.end(); |
| 56 for (HashSet<String>::iterator iter = m_blobURLs.begin(); iter != blobUR
LsEnd; ++iter) | 51 for (HashSet<String>::iterator iter = m_blobURLs.begin(); iter != blobUR
LsEnd; ++iter) |
| 57 ThreadableBlobRegistry::unregisterBlobURL(KURL(ParsedURLString, *ite
r)); | 52 ThreadableBlobRegistry::unregisterBlobURL(KURL(ParsedURLString, *ite
r)); |
| 58 | 53 |
| 59 #if ENABLE(MEDIA_STREAM) | 54 #if ENABLE(MEDIA_STREAM) |
| 60 HashSet<String>::iterator streamURLsEnd = m_streamURLs.end(); | 55 HashSet<String>::iterator streamURLsEnd = m_streamURLs.end(); |
| 61 for (HashSet<String>::iterator iter = m_streamURLs.begin(); iter != stre
amURLsEnd; ++iter) | 56 for (HashSet<String>::iterator iter = m_streamURLs.begin(); iter != stre
amURLsEnd; ++iter) |
| 62 MediaStreamRegistry::registry().unregisterMediaStreamURL(KURL(Parsed
URLString, *iter)); | 57 MediaStreamRegistry::registry().unregisterMediaStreamURL(KURL(Parsed
URLString, *iter)); |
| 63 #endif | 58 #endif |
| 64 #if ENABLE(MEDIA_SOURCE) | |
| 65 HashSet<String>::iterator sourceURLsEnd = m_sourceURLs.end(); | |
| 66 for (HashSet<String>::iterator iter = m_sourceURLs.begin(); iter != sour
ceURLsEnd; ++iter) | |
| 67 MediaSourceRegistry::registry().unregisterMediaSourceURL(KURL(Parsed
URLString, *iter)); | |
| 68 #endif | |
| 69 } | 59 } |
| 70 | 60 |
| 71 HashSet<String>& blobURLs() { return m_blobURLs; } | 61 HashSet<String>& blobURLs() { return m_blobURLs; } |
| 72 #if ENABLE(MEDIA_STREAM) | 62 #if ENABLE(MEDIA_STREAM) |
| 73 HashSet<String>& streamURLs() { return m_streamURLs; } | 63 HashSet<String>& streamURLs() { return m_streamURLs; } |
| 74 #endif | 64 #endif |
| 75 #if ENABLE(MEDIA_SOURCE) | |
| 76 HashSet<String>& sourceURLs() { return m_sourceURLs; } | |
| 77 #endif | |
| 78 | 65 |
| 79 private: | 66 private: |
| 80 HashSet<String> m_blobURLs; | 67 HashSet<String> m_blobURLs; |
| 81 #if ENABLE(MEDIA_STREAM) | 68 #if ENABLE(MEDIA_STREAM) |
| 82 HashSet<String> m_streamURLs; | 69 HashSet<String> m_streamURLs; |
| 83 #endif | 70 #endif |
| 84 #if ENABLE(MEDIA_SOURCE) | |
| 85 HashSet<String> m_sourceURLs; | |
| 86 #endif | |
| 87 }; | 71 }; |
| 88 | 72 |
| 89 } // namespace WebCore | 73 } // namespace WebCore |
| 90 | 74 |
| 91 #endif // BLOB | 75 #endif // BLOB |
| 92 #endif // PUBLICURLMANAGER_h | 76 #endif // PUBLICURLMANAGER_h |
| OLD | NEW |