| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // |uuid|. It's not the UUID generated and appended to the BlobURL, but an | 54 // |uuid|. It's not the UUID generated and appended to the BlobURL, but an |
| 55 // identifier for the object to which URL(s) are generated e.g. ones | 55 // identifier for the object to which URL(s) are generated e.g. ones |
| 56 // returned by blink::Blob::uuid(). | 56 // returned by blink::Blob::uuid(). |
| 57 String registerURL(ExecutionContext*, URLRegistrable*, const String& uuid); | 57 String registerURL(ExecutionContext*, URLRegistrable*, const String& uuid); |
| 58 // Revokes the given URL. | 58 // Revokes the given URL. |
| 59 void revoke(const KURL&); | 59 void revoke(const KURL&); |
| 60 // Revokes all URLs associated with |uuid|. | 60 // Revokes all URLs associated with |uuid|. |
| 61 void revoke(const String& uuid); | 61 void revoke(const String& uuid); |
| 62 | 62 |
| 63 // ContextLifecycleObserver interface. | 63 // ContextLifecycleObserver interface. |
| 64 void contextDestroyed() override; | 64 void contextDestroyed(ExecutionContext*) override; |
| 65 | 65 |
| 66 DECLARE_VIRTUAL_TRACE(); | 66 DECLARE_VIRTUAL_TRACE(); |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 explicit PublicURLManager(ExecutionContext*); | 69 explicit PublicURLManager(ExecutionContext*); |
| 70 | 70 |
| 71 // One or more URLs can be associated with the same unique ID. | 71 // One or more URLs can be associated with the same unique ID. |
| 72 // Objects need be revoked by unique ID in some cases. | 72 // Objects need be revoked by unique ID in some cases. |
| 73 typedef String URLString; | 73 typedef String URLString; |
| 74 typedef HashMap<URLString, String> URLMap; | 74 typedef HashMap<URLString, String> URLMap; |
| 75 // Map from URLRegistry instances to the maps which store association | 75 // Map from URLRegistry instances to the maps which store association |
| 76 // between URLs registered with the URLRegistry and UUIDs assigned for | 76 // between URLs registered with the URLRegistry and UUIDs assigned for |
| 77 // each of the URLs. | 77 // each of the URLs. |
| 78 typedef HashMap<URLRegistry*, URLMap> RegistryURLMap; | 78 typedef HashMap<URLRegistry*, URLMap> RegistryURLMap; |
| 79 | 79 |
| 80 RegistryURLMap m_registryToURL; | 80 RegistryURLMap m_registryToURL; |
| 81 bool m_isStopped; | 81 bool m_isStopped; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 } // namespace blink | 84 } // namespace blink |
| 85 | 85 |
| 86 #endif // PublicURLManager_h | 86 #endif // PublicURLManager_h |
| OLD | NEW |