| 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 21 matching lines...) Expand all Loading... |
| 32 #include <wtf/PassOwnPtr.h> | 32 #include <wtf/PassOwnPtr.h> |
| 33 #include "core/dom/ActiveDOMObject.h" | 33 #include "core/dom/ActiveDOMObject.h" |
| 34 #include "core/dom/ScriptExecutionContext.h" | 34 #include "core/dom/ScriptExecutionContext.h" |
| 35 #include "core/fileapi/Blob.h" | 35 #include "core/fileapi/Blob.h" |
| 36 #include "core/fileapi/BlobURL.h" | 36 #include "core/fileapi/BlobURL.h" |
| 37 #include "core/fileapi/ThreadableBlobRegistry.h" | 37 #include "core/fileapi/ThreadableBlobRegistry.h" |
| 38 #include "core/html/PublicURLManager.h" | 38 #include "core/html/PublicURLManager.h" |
| 39 #include "core/loader/cache/MemoryCache.h" | 39 #include "core/loader/cache/MemoryCache.h" |
| 40 #include "core/platform/KURL.h" | 40 #include "core/platform/KURL.h" |
| 41 #include "core/platform/network/ResourceRequest.h" | 41 #include "core/platform/network/ResourceRequest.h" |
| 42 #include "modules/mediasource/MediaSource.h" | |
| 43 #include "modules/mediasource/MediaSourceRegistry.h" | 42 #include "modules/mediasource/MediaSourceRegistry.h" |
| 43 #include "modules/mediasource/WebKitMediaSource.h" |
| 44 #include "modules/mediastream/MediaStream.h" | 44 #include "modules/mediastream/MediaStream.h" |
| 45 #include "modules/mediastream/MediaStreamRegistry.h" | 45 #include "modules/mediastream/MediaStreamRegistry.h" |
| 46 #include "origin/SecurityOrigin.h" | 46 #include "origin/SecurityOrigin.h" |
| 47 | 47 |
| 48 namespace WebCore { | 48 namespace WebCore { |
| 49 | 49 |
| 50 String DOMURL::createObjectURL(ScriptExecutionContext* scriptExecutionContext, M
ediaSource* source) | 50 String DOMURL::createObjectURL(ScriptExecutionContext* scriptExecutionContext, W
ebKitMediaSource* source) |
| 51 { | 51 { |
| 52 // Since WebWorkers cannot obtain MediaSource objects, we should be on the m
ain thread. | 52 // Since WebWorkers cannot obtain MediaSource objects, we should be on the m
ain thread. |
| 53 ASSERT(isMainThread()); | 53 ASSERT(isMainThread()); |
| 54 | 54 |
| 55 if (!scriptExecutionContext || !source) | 55 if (!scriptExecutionContext || !source) |
| 56 return String(); | 56 return String(); |
| 57 | 57 |
| 58 KURL publicURL = BlobURL::createPublicURL(scriptExecutionContext->securityOr
igin()); | 58 KURL publicURL = BlobURL::createPublicURL(scriptExecutionContext->securityOr
igin()); |
| 59 if (publicURL.isEmpty()) | 59 if (publicURL.isEmpty()) |
| 60 return String(); | 60 return String(); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 if (streamURLs.contains(url.string())) { | 121 if (streamURLs.contains(url.string())) { |
| 122 // FIXME: make sure of this assertion below. Raise a spec question if re
quired. | 122 // 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. | 123 // Since WebWorkers cannot obtain Stream objects, we should be on the ma
in thread. |
| 124 ASSERT(isMainThread()); | 124 ASSERT(isMainThread()); |
| 125 MediaStreamRegistry::registry().unregisterMediaStreamURL(url); | 125 MediaStreamRegistry::registry().unregisterMediaStreamURL(url); |
| 126 streamURLs.remove(url.string()); | 126 streamURLs.remove(url.string()); |
| 127 } | 127 } |
| 128 } | 128 } |
| 129 | 129 |
| 130 } // namespace WebCore | 130 } // namespace WebCore |
| OLD | NEW |