Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Side by Side Diff: Source/web/WebMediaPlayerClientImpl.h

Issue 438293003: Enable Oilpan by default for webaudio/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 HTMLMediaElement& mediaElement() const; 98 HTMLMediaElement& mediaElement() const;
99 99
100 MediaPlayerClient* m_client; 100 MediaPlayerClient* m_client;
101 OwnPtr<WebMediaPlayer> m_webMediaPlayer; 101 OwnPtr<WebMediaPlayer> m_webMediaPlayer;
102 102
103 #if ENABLE(WEB_AUDIO) 103 #if ENABLE(WEB_AUDIO)
104 // AudioClientImpl wraps an AudioSourceProviderClient. 104 // AudioClientImpl wraps an AudioSourceProviderClient.
105 // When the audio format is known, Chromium calls setFormat() which then dis patches into WebCore. 105 // When the audio format is known, Chromium calls setFormat() which then dis patches into WebCore.
106 106
107 class AudioClientImpl FINAL : public NoBaseWillBeGarbageCollectedFinalized<A udioClientImpl>, public WebAudioSourceProviderClient { 107 class AudioClientImpl FINAL : public GarbageCollectedFinalized<AudioClientIm pl>, public WebAudioSourceProviderClient {
108 public: 108 public:
109 explicit AudioClientImpl(AudioSourceProviderClient* client) 109 explicit AudioClientImpl(AudioSourceProviderClient* client)
110 : m_client(client) 110 : m_client(client)
111 { 111 {
112 } 112 }
113 113
114 virtual ~AudioClientImpl() { } 114 virtual ~AudioClientImpl() { }
115 115
116 // WebAudioSourceProviderClient 116 // WebAudioSourceProviderClient
117 virtual void setFormat(size_t numberOfChannels, float sampleRate) OVERRI DE; 117 virtual void setFormat(size_t numberOfChannels, float sampleRate) OVERRI DE;
118 118
119 void trace(Visitor*); 119 void trace(Visitor*);
120 120
121 private: 121 private:
122 RawPtrWillBeMember<AudioSourceProviderClient> m_client; 122 Member<AudioSourceProviderClient> m_client;
123 }; 123 };
124 124
125 // AudioSourceProviderImpl wraps a WebAudioSourceProvider. 125 // AudioSourceProviderImpl wraps a WebAudioSourceProvider.
126 // provideInput() calls into Chromium to get a rendered audio stream. 126 // provideInput() calls into Chromium to get a rendered audio stream.
127 127
128 class AudioSourceProviderImpl FINAL : public AudioSourceProvider { 128 class AudioSourceProviderImpl FINAL : public AudioSourceProvider {
129 public: 129 public:
130 AudioSourceProviderImpl() 130 AudioSourceProviderImpl()
131 : m_webAudioSourceProvider(0) 131 : m_webAudioSourceProvider(0)
132 { 132 {
133 } 133 }
134 134
135 virtual ~AudioSourceProviderImpl() { } 135 virtual ~AudioSourceProviderImpl() { }
136 136
137 // Wraps the given WebAudioSourceProvider. 137 // Wraps the given WebAudioSourceProvider.
138 void wrap(WebAudioSourceProvider*); 138 void wrap(WebAudioSourceProvider*);
139 139
140 // AudioSourceProvider 140 // AudioSourceProvider
141 virtual void setClient(AudioSourceProviderClient*) OVERRIDE; 141 virtual void setClient(AudioSourceProviderClient*) OVERRIDE;
142 virtual void provideInput(AudioBus*, size_t framesToProcess) OVERRIDE; 142 virtual void provideInput(AudioBus*, size_t framesToProcess) OVERRIDE;
143 143
144 private: 144 private:
145 WebAudioSourceProvider* m_webAudioSourceProvider; 145 WebAudioSourceProvider* m_webAudioSourceProvider;
146 OwnPtrWillBePersistent<AudioClientImpl> m_client; 146 Persistent<AudioClientImpl> m_client;
147 Mutex provideInputLock; 147 Mutex provideInputLock;
148 }; 148 };
149 149
150 AudioSourceProviderImpl m_audioSourceProvider; 150 AudioSourceProviderImpl m_audioSourceProvider;
151 #endif 151 #endif
152 }; 152 };
153 153
154 } // namespace blink 154 } // namespace blink
155 155
156 #endif 156 #endif
OLDNEW
« no previous file with comments | « Source/platform/audio/AudioSourceProviderClient.h ('k') | Source/web/WebMediaPlayerClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698