| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Motorola Mobility Inc. | 2 * Copyright (C) 2012 Motorola Mobility Inc. |
| 3 * Copyright (C) 2013 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2013 Google Inc. All Rights Reserved. |
| 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 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 class SecurityOrigin; | 37 class SecurityOrigin; |
| 38 | 38 |
| 39 PublicURLManager* PublicURLManager::create(ExecutionContext* context) { | 39 PublicURLManager* PublicURLManager::create(ExecutionContext* context) { |
| 40 PublicURLManager* publicURLManager = new PublicURLManager(context); | 40 PublicURLManager* publicURLManager = new PublicURLManager(context); |
| 41 publicURLManager->suspendIfNeeded(); | 41 publicURLManager->suspendIfNeeded(); |
| 42 return publicURLManager; | 42 return publicURLManager; |
| 43 } | 43 } |
| 44 | 44 |
| 45 PublicURLManager::PublicURLManager(ExecutionContext* context) | 45 PublicURLManager::PublicURLManager(ExecutionContext* context) |
| 46 : ActiveDOMObject(context), m_isStopped(false) {} | 46 : SuspendableObject(context), m_isStopped(false) {} |
| 47 | 47 |
| 48 String PublicURLManager::registerURL(ExecutionContext* context, | 48 String PublicURLManager::registerURL(ExecutionContext* context, |
| 49 URLRegistrable* registrable, | 49 URLRegistrable* registrable, |
| 50 const String& uuid) { | 50 const String& uuid) { |
| 51 SecurityOrigin* origin = context->getSecurityOrigin(); | 51 SecurityOrigin* origin = context->getSecurityOrigin(); |
| 52 const KURL& url = BlobURL::createPublicURL(origin); | 52 const KURL& url = BlobURL::createPublicURL(origin); |
| 53 DCHECK(!url.isEmpty()); | 53 DCHECK(!url.isEmpty()); |
| 54 const String& urlString = url.getString(); | 54 const String& urlString = url.getString(); |
| 55 | 55 |
| 56 if (!m_isStopped) { | 56 if (!m_isStopped) { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 m_isStopped = true; | 100 m_isStopped = true; |
| 101 for (auto& registryUrl : m_registryToURL) { | 101 for (auto& registryUrl : m_registryToURL) { |
| 102 for (auto& url : registryUrl.value) | 102 for (auto& url : registryUrl.value) |
| 103 registryUrl.key->unregisterURL(KURL(ParsedURLString, url.key)); | 103 registryUrl.key->unregisterURL(KURL(ParsedURLString, url.key)); |
| 104 } | 104 } |
| 105 | 105 |
| 106 m_registryToURL.clear(); | 106 m_registryToURL.clear(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 DEFINE_TRACE(PublicURLManager) { | 109 DEFINE_TRACE(PublicURLManager) { |
| 110 ActiveDOMObject::trace(visitor); | 110 SuspendableObject::trace(visitor); |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace blink | 113 } // namespace blink |
| OLD | NEW |