| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Ericsson AB. All rights reserved. | 2 * Copyright (C) 2011 Ericsson AB. All rights reserved. |
| 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 26 matching lines...) Expand all Loading... |
| 37 #include "wtf/PassOwnPtr.h" | 37 #include "wtf/PassOwnPtr.h" |
| 38 #include "wtf/PassRefPtr.h" | 38 #include "wtf/PassRefPtr.h" |
| 39 #include "wtf/ThreadingPrimitives.h" | 39 #include "wtf/ThreadingPrimitives.h" |
| 40 #include "wtf/text/WTFString.h" | 40 #include "wtf/text/WTFString.h" |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 class MediaStreamSource; | 44 class MediaStreamSource; |
| 45 class WebAudioSourceProvider; | 45 class WebAudioSourceProvider; |
| 46 | 46 |
| 47 class PLATFORM_EXPORT MediaStreamComponent FINAL : public GarbageCollectedFinali
zed<MediaStreamComponent> { | 47 class PLATFORM_EXPORT MediaStreamComponent final : public GarbageCollectedFinali
zed<MediaStreamComponent> { |
| 48 public: | 48 public: |
| 49 class ExtraData { | 49 class ExtraData { |
| 50 public: | 50 public: |
| 51 virtual ~ExtraData() { } | 51 virtual ~ExtraData() { } |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 static MediaStreamComponent* create(MediaStreamSource*); | 54 static MediaStreamComponent* create(MediaStreamSource*); |
| 55 static MediaStreamComponent* create(const String& id, MediaStreamSource*); | 55 static MediaStreamComponent* create(const String& id, MediaStreamSource*); |
| 56 | 56 |
| 57 MediaStreamSource* source() const { return m_source.get(); } | 57 MediaStreamSource* source() const { return m_source.get(); } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 73 void trace(Visitor*); | 73 void trace(Visitor*); |
| 74 void dispose(); | 74 void dispose(); |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 MediaStreamComponent(const String& id, MediaStreamSource*); | 77 MediaStreamComponent(const String& id, MediaStreamSource*); |
| 78 | 78 |
| 79 #if ENABLE(WEB_AUDIO) | 79 #if ENABLE(WEB_AUDIO) |
| 80 // AudioSourceProviderImpl wraps a WebAudioSourceProvider::provideInput() | 80 // AudioSourceProviderImpl wraps a WebAudioSourceProvider::provideInput() |
| 81 // calls into chromium to get a rendered audio stream. | 81 // calls into chromium to get a rendered audio stream. |
| 82 | 82 |
| 83 class PLATFORM_EXPORT AudioSourceProviderImpl FINAL: public AudioSourceProvi
der { | 83 class PLATFORM_EXPORT AudioSourceProviderImpl final: public AudioSourceProvi
der { |
| 84 public: | 84 public: |
| 85 AudioSourceProviderImpl() | 85 AudioSourceProviderImpl() |
| 86 : m_webAudioSourceProvider(0) | 86 : m_webAudioSourceProvider(0) |
| 87 { | 87 { |
| 88 } | 88 } |
| 89 | 89 |
| 90 virtual ~AudioSourceProviderImpl() { } | 90 virtual ~AudioSourceProviderImpl() { } |
| 91 | 91 |
| 92 // Wraps the given blink::WebAudioSourceProvider to blink::AudioSourcePr
ovider. | 92 // Wraps the given blink::WebAudioSourceProvider to blink::AudioSourcePr
ovider. |
| 93 void wrap(WebAudioSourceProvider*); | 93 void wrap(WebAudioSourceProvider*); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 108 bool m_enabled; | 108 bool m_enabled; |
| 109 bool m_muted; | 109 bool m_muted; |
| 110 OwnPtr<ExtraData> m_extraData; | 110 OwnPtr<ExtraData> m_extraData; |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 typedef HeapVector<Member<MediaStreamComponent> > MediaStreamComponentVector; | 113 typedef HeapVector<Member<MediaStreamComponent> > MediaStreamComponentVector; |
| 114 | 114 |
| 115 } // namespace blink | 115 } // namespace blink |
| 116 | 116 |
| 117 #endif // MediaStreamComponent_h | 117 #endif // MediaStreamComponent_h |
| OLD | NEW |