OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 void OnStopGeneratedStream(int render_view_id, const std::string& label); | 57 void OnStopGeneratedStream(int render_view_id, const std::string& label); |
58 | 58 |
59 // Returns the media stream manager to forward events to, | 59 // Returns the media stream manager to forward events to, |
60 // creating one if needed. | 60 // creating one if needed. |
61 MediaStreamManager* manager(); | 61 MediaStreamManager* manager(); |
62 | 62 |
63 const content::ResourceContext* resource_context_; | 63 const content::ResourceContext* resource_context_; |
64 int render_process_id_; | 64 int render_process_id_; |
65 | 65 |
66 struct StreamRequest { | 66 struct StreamRequest; |
67 StreamRequest() {} | |
68 StreamRequest(int render_view_id, int page_request_id) | |
69 : render_view_id(render_view_id), | |
70 page_request_id(page_request_id ) { | |
71 } | |
72 int render_view_id; | |
73 // Id of the request generated by MediaStreamDispatcher. | |
74 int page_request_id; | |
75 }; | |
76 typedef std::map<std::string, StreamRequest> StreamMap; | 67 typedef std::map<std::string, StreamRequest> StreamMap; |
77 // Streams generated for this host. | 68 // Streams generated for this host. |
78 StreamMap streams_; | 69 StreamMap streams_; |
79 | 70 |
80 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcherHost); | 71 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcherHost); |
81 }; | 72 }; |
82 | 73 |
83 } // namespace media_stream | 74 } // namespace media_stream |
84 | 75 |
85 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_ | 76 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_ |
OLD | NEW |