| 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 // MediaStreamManager is used to open/enumerate media capture devices (video | 5 // MediaStreamManager is used to open/enumerate media capture devices (video |
| 6 // supported now). Call flow: | 6 // supported now). Call flow: |
| 7 // 1. GenerateStream is called when a render process wants to use a capture | 7 // 1. GenerateStream is called when a render process wants to use a capture |
| 8 // device. | 8 // device. |
| 9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to | 9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to |
| 10 // use devices and for which device to use. | 10 // use devices and for which device to use. |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 const std::string& raw_unique_id); | 230 const std::string& raw_unique_id); |
| 231 | 231 |
| 232 // Convenience method to check if |device_guid| is an HMAC of | 232 // Convenience method to check if |device_guid| is an HMAC of |
| 233 // |raw_device_id| for |security_origin|. | 233 // |raw_device_id| for |security_origin|. |
| 234 static bool DoesMediaDeviceIDMatchHMAC( | 234 static bool DoesMediaDeviceIDMatchHMAC( |
| 235 const ResourceContext::SaltCallback& sc, | 235 const ResourceContext::SaltCallback& sc, |
| 236 const GURL& security_origin, | 236 const GURL& security_origin, |
| 237 const std::string& device_guid, | 237 const std::string& device_guid, |
| 238 const std::string& raw_unique_id); | 238 const std::string& raw_unique_id); |
| 239 | 239 |
| 240 void SetCapturingLinkSecured(content::MediaStreamType type, |
| 241 int session_id, |
| 242 bool is_secure); |
| 243 |
| 240 private: | 244 private: |
| 241 // Contains all data needed to keep track of requests. | 245 // Contains all data needed to keep track of requests. |
| 242 class DeviceRequest; | 246 class DeviceRequest; |
| 243 | 247 |
| 244 // Cache enumerated device list. | 248 // Cache enumerated device list. |
| 245 struct EnumerationCache { | 249 struct EnumerationCache { |
| 246 EnumerationCache(); | 250 EnumerationCache(); |
| 247 ~EnumerationCache(); | 251 ~EnumerationCache(); |
| 248 | 252 |
| 249 bool valid; | 253 bool valid; |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 439 |
| 436 // Maps render process hosts to log callbacks. Used on the IO thread. | 440 // Maps render process hosts to log callbacks. Used on the IO thread. |
| 437 std::map<int, base::Callback<void(const std::string&)>> log_callbacks_; | 441 std::map<int, base::Callback<void(const std::string&)>> log_callbacks_; |
| 438 | 442 |
| 439 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); | 443 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); |
| 440 }; | 444 }; |
| 441 | 445 |
| 442 } // namespace content | 446 } // namespace content |
| 443 | 447 |
| 444 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ | 448 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ |
| OLD | NEW |