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 19 matching lines...) Expand all Loading... |
30 | 30 |
31 #include "core/dom/ScriptExecutionContext.h" | 31 #include "core/dom/ScriptExecutionContext.h" |
32 #include "core/fileapi/Blob.h" | 32 #include "core/fileapi/Blob.h" |
33 #include "core/fileapi/BlobURL.h" | 33 #include "core/fileapi/BlobURL.h" |
34 #include "core/html/PublicURLManager.h" | 34 #include "core/html/PublicURLManager.h" |
35 #include "core/loader/cache/MemoryCache.h" | 35 #include "core/loader/cache/MemoryCache.h" |
36 #include "modules/mediasource/MediaSourceBase.h" | 36 #include "modules/mediasource/MediaSourceBase.h" |
37 #include "modules/mediastream/MediaStream.h" | 37 #include "modules/mediastream/MediaStream.h" |
38 #include "weborigin/KURL.h" | 38 #include "weborigin/KURL.h" |
39 #include "wtf/MainThread.h" | 39 #include "wtf/MainThread.h" |
40 #include "wtf/PassOwnPtr.h" | |
41 | 40 |
42 namespace WebCore { | 41 namespace WebCore { |
43 | 42 |
44 String DOMURL::createObjectURL(ScriptExecutionContext* scriptExecutionContext, M
ediaSourceBase* source) | 43 String DOMURL::createObjectURL(ScriptExecutionContext* scriptExecutionContext, M
ediaSourceBase* source) |
45 { | 44 { |
46 // Since WebWorkers cannot obtain MediaSource objects, we should be on the m
ain thread. | 45 // Since WebWorkers cannot obtain MediaSource objects, we should be on the m
ain thread. |
47 ASSERT(isMainThread()); | 46 ASSERT(isMainThread()); |
48 | 47 |
49 if (!scriptExecutionContext || !source) | 48 if (!scriptExecutionContext || !source) |
50 return String(); | 49 return String(); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 { | 82 { |
84 if (!scriptExecutionContext) | 83 if (!scriptExecutionContext) |
85 return; | 84 return; |
86 | 85 |
87 KURL url(KURL(), urlString); | 86 KURL url(KURL(), urlString); |
88 MemoryCache::removeURLFromCache(scriptExecutionContext, url); | 87 MemoryCache::removeURLFromCache(scriptExecutionContext, url); |
89 scriptExecutionContext->publicURLManager().revoke(url); | 88 scriptExecutionContext->publicURLManager().revoke(url); |
90 } | 89 } |
91 | 90 |
92 } // namespace WebCore | 91 } // namespace WebCore |
OLD | NEW |