| 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 "ScriptExecutionContext.h" | 30 #include "ScriptExecutionContext.h" |
| 31 #include "ThreadableBlobRegistry.h" | 31 #include "ThreadableBlobRegistry.h" |
| 32 #include <wtf/HashSet.h> | 32 #include <wtf/HashSet.h> |
| 33 #include <wtf/text/WTFString.h> | 33 #include <wtf/text/WTFString.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" | 40 #include "MediaSource.h" |
| 42 #include "MediaSourceRegistry.h" | 41 #include "MediaSourceRegistry.h" |
| 43 #endif | |
| 44 | 42 |
| 45 namespace WebCore { | 43 namespace WebCore { |
| 46 | 44 |
| 47 class ScriptExecutionContext; | 45 class ScriptExecutionContext; |
| 48 | 46 |
| 49 class PublicURLManager { | 47 class PublicURLManager { |
| 50 WTF_MAKE_FAST_ALLOCATED; | 48 WTF_MAKE_FAST_ALLOCATED; |
| 51 public: | 49 public: |
| 52 static PassOwnPtr<PublicURLManager> create() { return adoptPtr(new PublicURL
Manager); } | 50 static PassOwnPtr<PublicURLManager> create() { return adoptPtr(new PublicURL
Manager); } |
| 53 void contextDestroyed() | 51 void contextDestroyed() |
| 54 { | 52 { |
| 55 HashSet<String>::iterator blobURLsEnd = m_blobURLs.end(); | 53 HashSet<String>::iterator blobURLsEnd = m_blobURLs.end(); |
| 56 for (HashSet<String>::iterator iter = m_blobURLs.begin(); iter != blobUR
LsEnd; ++iter) | 54 for (HashSet<String>::iterator iter = m_blobURLs.begin(); iter != blobUR
LsEnd; ++iter) |
| 57 ThreadableBlobRegistry::unregisterBlobURL(KURL(ParsedURLString, *ite
r)); | 55 ThreadableBlobRegistry::unregisterBlobURL(KURL(ParsedURLString, *ite
r)); |
| 58 | 56 |
| 59 #if ENABLE(MEDIA_STREAM) | 57 #if ENABLE(MEDIA_STREAM) |
| 60 HashSet<String>::iterator streamURLsEnd = m_streamURLs.end(); | 58 HashSet<String>::iterator streamURLsEnd = m_streamURLs.end(); |
| 61 for (HashSet<String>::iterator iter = m_streamURLs.begin(); iter != stre
amURLsEnd; ++iter) | 59 for (HashSet<String>::iterator iter = m_streamURLs.begin(); iter != stre
amURLsEnd; ++iter) |
| 62 MediaStreamRegistry::registry().unregisterMediaStreamURL(KURL(Parsed
URLString, *iter)); | 60 MediaStreamRegistry::registry().unregisterMediaStreamURL(KURL(Parsed
URLString, *iter)); |
| 63 #endif | 61 #endif |
| 64 #if ENABLE(MEDIA_SOURCE) | |
| 65 HashSet<String>::iterator sourceURLsEnd = m_sourceURLs.end(); | 62 HashSet<String>::iterator sourceURLsEnd = m_sourceURLs.end(); |
| 66 for (HashSet<String>::iterator iter = m_sourceURLs.begin(); iter != sour
ceURLsEnd; ++iter) | 63 for (HashSet<String>::iterator iter = m_sourceURLs.begin(); iter != sour
ceURLsEnd; ++iter) |
| 67 MediaSourceRegistry::registry().unregisterMediaSourceURL(KURL(Parsed
URLString, *iter)); | 64 MediaSourceRegistry::registry().unregisterMediaSourceURL(KURL(Parsed
URLString, *iter)); |
| 68 #endif | |
| 69 } | 65 } |
| 70 | 66 |
| 71 HashSet<String>& blobURLs() { return m_blobURLs; } | 67 HashSet<String>& blobURLs() { return m_blobURLs; } |
| 72 #if ENABLE(MEDIA_STREAM) | 68 #if ENABLE(MEDIA_STREAM) |
| 73 HashSet<String>& streamURLs() { return m_streamURLs; } | 69 HashSet<String>& streamURLs() { return m_streamURLs; } |
| 74 #endif | 70 #endif |
| 75 #if ENABLE(MEDIA_SOURCE) | |
| 76 HashSet<String>& sourceURLs() { return m_sourceURLs; } | 71 HashSet<String>& sourceURLs() { return m_sourceURLs; } |
| 77 #endif | |
| 78 | 72 |
| 79 private: | 73 private: |
| 80 HashSet<String> m_blobURLs; | 74 HashSet<String> m_blobURLs; |
| 81 #if ENABLE(MEDIA_STREAM) | 75 #if ENABLE(MEDIA_STREAM) |
| 82 HashSet<String> m_streamURLs; | 76 HashSet<String> m_streamURLs; |
| 83 #endif | 77 #endif |
| 84 #if ENABLE(MEDIA_SOURCE) | |
| 85 HashSet<String> m_sourceURLs; | 78 HashSet<String> m_sourceURLs; |
| 86 #endif | |
| 87 }; | 79 }; |
| 88 | 80 |
| 89 } // namespace WebCore | 81 } // namespace WebCore |
| 90 | 82 |
| 91 #endif // BLOB | 83 #endif // BLOB |
| 92 #endif // PUBLICURLMANAGER_h | 84 #endif // PUBLICURLMANAGER_h |
| OLD | NEW |