| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 #include "core/html/URLRegistry.h" | 28 #include "core/html/URLRegistry.h" |
| 29 #include "platform/heap/Handle.h" | 29 #include "platform/heap/Handle.h" |
| 30 #include "wtf/HashMap.h" | 30 #include "wtf/HashMap.h" |
| 31 #include "wtf/PassRefPtr.h" | 31 #include "wtf/PassRefPtr.h" |
| 32 #include "wtf/text/StringHash.h" | 32 #include "wtf/text/StringHash.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class KURL; | 36 class KURL; |
| 37 class MediaStream; | |
| 38 class MediaStreamDescriptor; | 37 class MediaStreamDescriptor; |
| 39 | 38 |
| 40 class MediaStreamRegistry final : public URLRegistry { | 39 class MediaStreamRegistry final : public URLRegistry { |
| 41 public: | 40 public: |
| 42 // Returns a single instance of MediaStreamRegistry. | 41 // Returns a single instance of MediaStreamRegistry. |
| 43 static MediaStreamRegistry& registry(); | 42 static MediaStreamRegistry& registry(); |
| 44 | 43 |
| 45 // Registers a blob URL referring to the specified stream data. | 44 // Registers a blob URL referring to the specified stream data. |
| 46 virtual void registerURL(SecurityOrigin*, const KURL&, URLRegistrable*) over
ride; | 45 virtual void registerURL(SecurityOrigin*, const KURL&, URLRegistrable*) over
ride; |
| 47 virtual void unregisterURL(const KURL&) override; | 46 virtual void unregisterURL(const KURL&) override; |
| 48 virtual bool contains(const String&) override; | 47 virtual bool contains(const String&) override; |
| 49 | 48 |
| 50 MediaStreamDescriptor* lookupMediaStreamDescriptor(const String& url); | 49 MediaStreamDescriptor* lookupMediaStreamDescriptor(const String& url); |
| 51 | 50 |
| 52 private: | 51 private: |
| 53 MediaStreamRegistry(); | 52 MediaStreamRegistry(); |
| 54 PersistentHeapHashMap<String, Member<MediaStreamDescriptor> > m_streamDescri
ptors; | 53 PersistentHeapHashMap<String, Member<MediaStreamDescriptor> > m_streamDescri
ptors; |
| 55 }; | 54 }; |
| 56 | 55 |
| 57 } // namespace blink | 56 } // namespace blink |
| 58 | 57 |
| 59 #endif // MediaStreamRegistry_h | 58 #endif // MediaStreamRegistry_h |
| OLD | NEW |