summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/PublicURLManager.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/PublicURLManager.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/html/PublicURLManager.h')
-rw-r--r--Source/WebCore/html/PublicURLManager.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/Source/WebCore/html/PublicURLManager.h b/Source/WebCore/html/PublicURLManager.h
index 9ad01bd45..e326545dc 100644
--- a/Source/WebCore/html/PublicURLManager.h
+++ b/Source/WebCore/html/PublicURLManager.h
@@ -23,14 +23,12 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef PublicURLManager_h
-#define PublicURLManager_h
+#pragma once
-#if ENABLE(BLOB)
+#include "ActiveDOMObject.h"
+#include <memory>
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
@@ -41,22 +39,26 @@ class SecurityOrigin;
class URLRegistry;
class URLRegistrable;
-class PublicURLManager {
+class PublicURLManager final : public ActiveDOMObject {
WTF_MAKE_FAST_ALLOCATED;
public:
- static OwnPtr<PublicURLManager> create() { return adoptPtr(new PublicURLManager); }
+ explicit PublicURLManager(ScriptExecutionContext*);
- void registerURL(SecurityOrigin*, const URL&, URLRegistrable*);
+ static std::unique_ptr<PublicURLManager> create(ScriptExecutionContext*);
+
+ void registerURL(SecurityOrigin*, const URL&, URLRegistrable&);
void revoke(const URL&);
- void contextDestroyed();
private:
+ // ActiveDOMObject API.
+ void stop() override;
+ bool canSuspendForDocumentSuspension() const override;
+ const char* activeDOMObjectName() const override;
+
typedef HashSet<String> URLSet;
typedef HashMap<URLRegistry*, URLSet > RegistryURLMap;
RegistryURLMap m_registryToURL;
+ bool m_isStopped;
};
} // namespace WebCore
-
-#endif // BLOB
-#endif // PUBLICURLMANAGER_h