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 #include "content/browser/renderer_host/media/media_stream_manager.h" | 5 #include "content/browser/renderer_host/media/media_stream_manager.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
211 // If we appended a device_id scheme, we want to remove it when notifying | 211 // If we appended a device_id scheme, we want to remove it when notifying |
212 // observers which may be in different modules since this scheme is only | 212 // observers which may be in different modules since this scheme is only |
213 // used internally within the content module. | 213 // used internally within the content module. |
214 std::string device_id = | 214 std::string device_id = |
215 WebContentsCaptureUtil::StripWebContentsDeviceScheme( | 215 WebContentsCaptureUtil::StripWebContentsDeviceScheme( |
216 ui_request_->tab_capture_device_id); | 216 ui_request_->tab_capture_device_id); |
217 | 217 |
218 media_observer->OnMediaRequestStateChanged( | 218 media_observer->OnMediaRequestStateChanged( |
219 ui_request_->render_process_id, ui_request_->render_view_id, | 219 ui_request_->render_process_id, ui_request_->render_view_id, |
220 ui_request_->page_request_id, | 220 ui_request_->page_request_id, |
221 MediaStreamDevice(stream_type, device_id, device_id), new_state); | 221 MediaStreamDevice(stream_type, device_id, device_id, |
222 ui_request_->security_origin), | |
hshi1
2014/01/17 02:21:25
Note: alternatively I can just pass the GURL |secu
| |
223 new_state); | |
222 } | 224 } |
223 | 225 |
224 MediaRequestState state(MediaStreamType stream_type) const { | 226 MediaRequestState state(MediaStreamType stream_type) const { |
225 return state_[stream_type]; | 227 return state_[stream_type]; |
226 } | 228 } |
227 | 229 |
228 MediaStreamRequester* const requester; // Can be NULL. | 230 MediaStreamRequester* const requester; // Can be NULL. |
229 | 231 |
230 | 232 |
231 // The render process id that requested this stream to be generated and that | 233 // The render process id that requested this stream to be generated and that |
(...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1694 } | 1696 } |
1695 | 1697 |
1696 // Always do enumeration even though some enumeration is in progress, | 1698 // Always do enumeration even though some enumeration is in progress, |
1697 // because those enumeration commands could be sent before these devices | 1699 // because those enumeration commands could be sent before these devices |
1698 // change. | 1700 // change. |
1699 ++active_enumeration_ref_count_[stream_type]; | 1701 ++active_enumeration_ref_count_[stream_type]; |
1700 GetDeviceManager(stream_type)->EnumerateDevices(stream_type); | 1702 GetDeviceManager(stream_type)->EnumerateDevices(stream_type); |
1701 } | 1703 } |
1702 | 1704 |
1703 } // namespace content | 1705 } // namespace content |
OLD | NEW |