OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Motorola Mobility Inc. | 2 * Copyright (C) 2012 Motorola Mobility Inc. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "wtf/text/WTFString.h" | 33 #include "wtf/text/WTFString.h" |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
36 | 36 |
37 class KURL; | 37 class KURL; |
38 class ExecutionContext; | 38 class ExecutionContext; |
39 class SecurityOrigin; | 39 class SecurityOrigin; |
40 class URLRegistry; | 40 class URLRegistry; |
41 class URLRegistrable; | 41 class URLRegistrable; |
42 | 42 |
43 class PublicURLManager FINAL : public ActiveDOMObject { | 43 class PublicURLManager final : public ActiveDOMObject { |
44 WTF_MAKE_FAST_ALLOCATED; | 44 WTF_MAKE_FAST_ALLOCATED; |
45 public: | 45 public: |
46 static PassOwnPtr<PublicURLManager> create(ExecutionContext*); | 46 static PassOwnPtr<PublicURLManager> create(ExecutionContext*); |
47 | 47 |
48 void registerURL(SecurityOrigin*, const KURL&, URLRegistrable*, const String
& uuid = String()); | 48 void registerURL(SecurityOrigin*, const KURL&, URLRegistrable*, const String
& uuid = String()); |
49 void revoke(const KURL&); | 49 void revoke(const KURL&); |
50 void revoke(const String& uuid); | 50 void revoke(const String& uuid); |
51 | 51 |
52 // ActiveDOMObject interface. | 52 // ActiveDOMObject interface. |
53 virtual void stop() OVERRIDE; | 53 virtual void stop() override; |
54 | 54 |
55 private: | 55 private: |
56 PublicURLManager(ExecutionContext*); | 56 PublicURLManager(ExecutionContext*); |
57 | 57 |
58 // One or more URLs can be associated with the same unique ID. | 58 // One or more URLs can be associated with the same unique ID. |
59 // Objects need be revoked by unique ID in some cases. | 59 // Objects need be revoked by unique ID in some cases. |
60 typedef String URLString; | 60 typedef String URLString; |
61 typedef HashMap<URLString, String> URLMap; | 61 typedef HashMap<URLString, String> URLMap; |
62 typedef HashMap<URLRegistry*, URLMap> RegistryURLMap; | 62 typedef HashMap<URLRegistry*, URLMap> RegistryURLMap; |
63 | 63 |
64 RegistryURLMap m_registryToURL; | 64 RegistryURLMap m_registryToURL; |
65 bool m_isStopped; | 65 bool m_isStopped; |
66 }; | 66 }; |
67 | 67 |
68 } // namespace blink | 68 } // namespace blink |
69 | 69 |
70 #endif // PublicURLManager_h | 70 #endif // PublicURLManager_h |
OLD | NEW |