| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Motorola Mobility Inc. | 3 * Copyright (C) 2012 Motorola Mobility Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "config.h" | 27 #include "config.h" |
| 28 | 28 |
| 29 #include "core/html/DOMURL.h" | 29 #include "core/html/DOMURL.h" |
| 30 | 30 |
| 31 #include <wtf/MainThread.h> | 31 #include <wtf/MainThread.h> |
| 32 #include <wtf/PassOwnPtr.h> | 32 #include <wtf/PassOwnPtr.h> |
| 33 #include "core/dom/ActiveDOMObject.h" | |
| 34 #include "core/dom/ScriptExecutionContext.h" | 33 #include "core/dom/ScriptExecutionContext.h" |
| 35 #include "core/fileapi/Blob.h" | 34 #include "core/fileapi/Blob.h" |
| 36 #include "core/fileapi/BlobURL.h" | 35 #include "core/fileapi/BlobURL.h" |
| 37 #include "core/fileapi/ThreadableBlobRegistry.h" | 36 #include "core/fileapi/ThreadableBlobRegistry.h" |
| 38 #include "core/html/PublicURLManager.h" | 37 #include "core/html/PublicURLManager.h" |
| 39 #include "core/loader/cache/MemoryCache.h" | 38 #include "core/loader/cache/MemoryCache.h" |
| 40 #include "core/platform/KURL.h" | |
| 41 #include "core/platform/network/ResourceRequest.h" | |
| 42 #include "modules/mediasource/MediaSourceRegistry.h" | 39 #include "modules/mediasource/MediaSourceRegistry.h" |
| 43 #include "modules/mediasource/WebKitMediaSource.h" | 40 #include "modules/mediasource/WebKitMediaSource.h" |
| 44 #include "modules/mediastream/MediaStream.h" | 41 #include "modules/mediastream/MediaStream.h" |
| 45 #include "modules/mediastream/MediaStreamRegistry.h" | 42 #include "modules/mediastream/MediaStreamRegistry.h" |
| 46 #include "weborigin/SecurityOrigin.h" | |
| 47 | 43 |
| 48 namespace WebCore { | 44 namespace WebCore { |
| 49 | 45 |
| 50 String DOMURL::createObjectURL(ScriptExecutionContext* scriptExecutionContext, W
ebKitMediaSource* source) | 46 String DOMURL::createObjectURL(ScriptExecutionContext* scriptExecutionContext, W
ebKitMediaSource* source) |
| 51 { | 47 { |
| 52 // Since WebWorkers cannot obtain MediaSource objects, we should be on the m
ain thread. | 48 // Since WebWorkers cannot obtain MediaSource objects, we should be on the m
ain thread. |
| 53 ASSERT(isMainThread()); | 49 ASSERT(isMainThread()); |
| 54 | 50 |
| 55 if (!scriptExecutionContext || !source) | 51 if (!scriptExecutionContext || !source) |
| 56 return String(); | 52 return String(); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 if (streamURLs.contains(url.string())) { | 117 if (streamURLs.contains(url.string())) { |
| 122 // FIXME: make sure of this assertion below. Raise a spec question if re
quired. | 118 // FIXME: make sure of this assertion below. Raise a spec question if re
quired. |
| 123 // Since WebWorkers cannot obtain Stream objects, we should be on the ma
in thread. | 119 // Since WebWorkers cannot obtain Stream objects, we should be on the ma
in thread. |
| 124 ASSERT(isMainThread()); | 120 ASSERT(isMainThread()); |
| 125 MediaStreamRegistry::registry().unregisterMediaStreamURL(url); | 121 MediaStreamRegistry::registry().unregisterMediaStreamURL(url); |
| 126 streamURLs.remove(url.string()); | 122 streamURLs.remove(url.string()); |
| 127 } | 123 } |
| 128 } | 124 } |
| 129 | 125 |
| 130 } // namespace WebCore | 126 } // namespace WebCore |
| OLD | NEW |