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

Side by Side Diff: content/browser/renderer_host/media/media_stream_dispatcher_host.h

Issue 9369009: Make content::ResourceContext be a real interface like the rest of the Content API (i.e. don't ha... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 10 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 // 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 10 matching lines...) Expand all
21 21
22 namespace media_stream { 22 namespace media_stream {
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(const content::ResourceContext* resource_context, 31 MediaStreamDispatcherHost(content::ResourceContext* resource_context,
32 int render_process_id); 32 int render_process_id);
33 virtual ~MediaStreamDispatcherHost(); 33 virtual ~MediaStreamDispatcherHost();
34 34
35 // MediaStreamRequester implementation. 35 // MediaStreamRequester implementation.
36 virtual void StreamGenerated( 36 virtual void StreamGenerated(
37 const std::string& label, 37 const std::string& label,
38 const StreamDeviceInfoArray& audio_devices, 38 const StreamDeviceInfoArray& audio_devices,
39 const StreamDeviceInfoArray& video_devices) OVERRIDE; 39 const StreamDeviceInfoArray& video_devices) OVERRIDE;
40 virtual void StreamGenerationFailed(const std::string& label) OVERRIDE; 40 virtual void StreamGenerationFailed(const std::string& label) OVERRIDE;
41 virtual void AudioDeviceFailed(const std::string& label, int index) OVERRIDE; 41 virtual void AudioDeviceFailed(const std::string& label, int index) OVERRIDE;
(...skipping 28 matching lines...) Expand all
70 void OnOpenDevice(int render_view_id, 70 void OnOpenDevice(int render_view_id,
71 int page_request_id, 71 int page_request_id,
72 const std::string& device_id, 72 const std::string& device_id,
73 media_stream::MediaStreamType type, 73 media_stream::MediaStreamType type,
74 const std::string& security_origin); 74 const std::string& security_origin);
75 75
76 // Returns the media stream manager to forward events to, 76 // Returns the media stream manager to forward events to,
77 // creating one if needed. 77 // creating one if needed.
78 MediaStreamManager* manager(); 78 MediaStreamManager* manager();
79 79
80 const content::ResourceContext* resource_context_; 80 content::ResourceContext* resource_context_;
81 int render_process_id_; 81 int render_process_id_;
82 82
83 struct StreamRequest; 83 struct StreamRequest;
84 typedef std::map<std::string, StreamRequest> StreamMap; 84 typedef std::map<std::string, StreamRequest> StreamMap;
85 // Streams generated for this host. 85 // Streams generated for this host.
86 StreamMap streams_; 86 StreamMap streams_;
87 87
88 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcherHost); 88 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcherHost);
89 }; 89 };
90 90
91 } // namespace media_stream 91 } // namespace media_stream
92 92
93 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_ 93 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698