OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PPAPI_PROXY_MEDIA_STREAM_AUDIO_TRACK_RESOURCE_H_ | 5 #ifndef PPAPI_PROXY_MEDIA_STREAM_AUDIO_TRACK_RESOURCE_H_ |
6 #define PPAPI_PROXY_MEDIA_STREAM_AUDIO_TRACK_RESOURCE_H_ | 6 #define PPAPI_PROXY_MEDIA_STREAM_AUDIO_TRACK_RESOURCE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | |
dcheng
2014/05/28 15:55:44
Stray include?
thembrown
2014/05/28 17:13:11
cpplint.py complained about it (was transitively i
| |
9 | 10 |
10 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
11 #include "ppapi/proxy/media_stream_track_resource_base.h" | 12 #include "ppapi/proxy/media_stream_track_resource_base.h" |
12 #include "ppapi/proxy/ppapi_proxy_export.h" | 13 #include "ppapi/proxy/ppapi_proxy_export.h" |
13 #include "ppapi/thunk/ppb_media_stream_audio_track_api.h" | 14 #include "ppapi/thunk/ppb_media_stream_audio_track_api.h" |
14 | 15 |
15 namespace ppapi { | 16 namespace ppapi { |
16 namespace proxy { | 17 namespace proxy { |
17 | 18 |
18 class AudioBufferResource; | 19 class AudioBufferResource; |
(...skipping 27 matching lines...) Expand all Loading... | |
46 virtual void Close() OVERRIDE; | 47 virtual void Close() OVERRIDE; |
47 | 48 |
48 // MediaStreamBufferManager::Delegate overrides: | 49 // MediaStreamBufferManager::Delegate overrides: |
49 virtual void OnNewBufferEnqueued() OVERRIDE; | 50 virtual void OnNewBufferEnqueued() OVERRIDE; |
50 | 51 |
51 private: | 52 private: |
52 PP_Resource GetAudioBuffer(); | 53 PP_Resource GetAudioBuffer(); |
53 | 54 |
54 void ReleaseBuffers(); | 55 void ReleaseBuffers(); |
55 | 56 |
57 // IPC message handlers. | |
58 void OnPluginMsgConfigureReply(const ResourceMessageReplyParams& params); | |
59 | |
56 // Allocated buffer resources by |GetBuffer()|. | 60 // Allocated buffer resources by |GetBuffer()|. |
57 typedef std::map<PP_Resource, scoped_refptr<AudioBufferResource> > BufferMap; | 61 typedef std::map<PP_Resource, scoped_refptr<AudioBufferResource> > BufferMap; |
58 BufferMap buffers_; | 62 BufferMap buffers_; |
59 | 63 |
60 PP_Resource* get_buffer_output_; | 64 PP_Resource* get_buffer_output_; |
61 | 65 |
66 scoped_refptr<TrackedCallback> configure_callback_; | |
67 | |
62 scoped_refptr<TrackedCallback> get_buffer_callback_; | 68 scoped_refptr<TrackedCallback> get_buffer_callback_; |
63 | 69 |
64 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioTrackResource); | 70 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioTrackResource); |
65 }; | 71 }; |
66 | 72 |
67 } // namespace proxy | 73 } // namespace proxy |
68 } // namespace ppapi | 74 } // namespace ppapi |
69 | 75 |
70 #endif // PPAPI_PROXY_MEDIA_STREAM_AUDIO_TRACK_RESOURCE_H_ | 76 #endif // PPAPI_PROXY_MEDIA_STREAM_AUDIO_TRACK_RESOURCE_H_ |
OLD | NEW |