OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 // MediaStreamDispatcherHost is a delegate for Media Stream API messages used by | 24 // MediaStreamDispatcherHost is a delegate for Media Stream API messages used by |
25 // MediaStreamImpl. It's the complement of MediaStreamDispatcher | 25 // MediaStreamImpl. It's the complement of MediaStreamDispatcher |
26 // (owned by RenderView). | 26 // (owned by RenderView). |
27 class CONTENT_EXPORT MediaStreamDispatcherHost | 27 class CONTENT_EXPORT MediaStreamDispatcherHost |
28 : public content::BrowserMessageFilter, | 28 : public content::BrowserMessageFilter, |
29 public MediaStreamRequester { | 29 public MediaStreamRequester { |
30 public: | 30 public: |
31 MediaStreamDispatcherHost(content::ResourceContext* resource_context, | 31 MediaStreamDispatcherHost(content::ResourceContext* resource_context, |
32 int render_process_id, | 32 int render_process_id, |
33 AudioManager* audio_manager); | 33 media::AudioManager* audio_manager); |
34 virtual ~MediaStreamDispatcherHost(); | 34 virtual ~MediaStreamDispatcherHost(); |
35 | 35 |
36 // MediaStreamRequester implementation. | 36 // MediaStreamRequester implementation. |
37 virtual void StreamGenerated( | 37 virtual void StreamGenerated( |
38 const std::string& label, | 38 const std::string& label, |
39 const StreamDeviceInfoArray& audio_devices, | 39 const StreamDeviceInfoArray& audio_devices, |
40 const StreamDeviceInfoArray& video_devices) OVERRIDE; | 40 const StreamDeviceInfoArray& video_devices) OVERRIDE; |
41 virtual void StreamGenerationFailed(const std::string& label) OVERRIDE; | 41 virtual void StreamGenerationFailed(const std::string& label) OVERRIDE; |
42 virtual void AudioDeviceFailed(const std::string& label, int index) OVERRIDE; | 42 virtual void AudioDeviceFailed(const std::string& label, int index) OVERRIDE; |
43 virtual void VideoDeviceFailed(const std::string& label, int index) OVERRIDE; | 43 virtual void VideoDeviceFailed(const std::string& label, int index) OVERRIDE; |
(...skipping 29 matching lines...) Expand all Loading... |
73 const std::string& device_id, | 73 const std::string& device_id, |
74 media_stream::MediaStreamType type, | 74 media_stream::MediaStreamType type, |
75 const std::string& security_origin); | 75 const std::string& security_origin); |
76 | 76 |
77 // Returns the media stream manager to forward events to, | 77 // Returns the media stream manager to forward events to, |
78 // creating one if needed. | 78 // creating one if needed. |
79 MediaStreamManager* manager(); | 79 MediaStreamManager* manager(); |
80 | 80 |
81 content::ResourceContext* resource_context_; | 81 content::ResourceContext* resource_context_; |
82 int render_process_id_; | 82 int render_process_id_; |
83 AudioManager* audio_manager_; | 83 media::AudioManager* audio_manager_; |
84 | 84 |
85 struct StreamRequest; | 85 struct StreamRequest; |
86 typedef std::map<std::string, StreamRequest> StreamMap; | 86 typedef std::map<std::string, StreamRequest> StreamMap; |
87 // Streams generated for this host. | 87 // Streams generated for this host. |
88 StreamMap streams_; | 88 StreamMap streams_; |
89 | 89 |
90 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcherHost); | 90 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcherHost); |
91 }; | 91 }; |
92 | 92 |
93 } // namespace media_stream | 93 } // namespace media_stream |
94 | 94 |
95 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_ | 95 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_ |
OLD | NEW |