| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_DEVICES_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_DEVICES_DISPATCHER_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_DEVICES_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_DEVICES_DISPATCHER_HOST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 // ::mojom::MediaDevicesDispatcherHost implementation. | 42 // ::mojom::MediaDevicesDispatcherHost implementation. |
| 43 void EnumerateDevices( | 43 void EnumerateDevices( |
| 44 bool request_audio_input, | 44 bool request_audio_input, |
| 45 bool request_video_input, | 45 bool request_video_input, |
| 46 bool request_audio_output, | 46 bool request_audio_output, |
| 47 const url::Origin& security_origin, | 47 const url::Origin& security_origin, |
| 48 const EnumerateDevicesCallback& client_callback) override; | 48 const EnumerateDevicesCallback& client_callback) override; |
| 49 | 49 |
| 50 void SetPermissionChecker( | 50 void SetPermissionChecker( |
| 51 const MediaDevicesPermissionChecker& permission_checker); | 51 std::unique_ptr<MediaDevicesPermissionChecker> permission_checker); |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 void DoEnumerateDevices( | 54 void DoEnumerateDevices( |
| 55 const MediaDevicesManager::BoolDeviceTypes& requested_types, | 55 const MediaDevicesManager::BoolDeviceTypes& requested_types, |
| 56 const url::Origin& security_origin, | 56 const url::Origin& security_origin, |
| 57 const EnumerateDevicesCallback& client_callback, | 57 const EnumerateDevicesCallback& client_callback, |
| 58 const MediaDevicesManager::BoolDeviceTypes& permissions); | 58 const MediaDevicesManager::BoolDeviceTypes& permissions); |
| 59 | 59 |
| 60 void DevicesEnumerated( | 60 void DevicesEnumerated( |
| 61 const MediaDevicesManager::BoolDeviceTypes& requested_types, | 61 const MediaDevicesManager::BoolDeviceTypes& requested_types, |
| 62 const url::Origin& security_origin, | 62 const url::Origin& security_origin, |
| 63 const EnumerateDevicesCallback& client_callback, | 63 const EnumerateDevicesCallback& client_callback, |
| 64 const MediaDevicesManager::BoolDeviceTypes& has_permissions, | 64 const MediaDevicesManager::BoolDeviceTypes& has_permissions, |
| 65 const MediaDeviceEnumeration& enumeration); | 65 const MediaDeviceEnumeration& enumeration); |
| 66 | 66 |
| 67 int render_process_id_; | 67 int render_process_id_; |
| 68 int routing_id_; | 68 int routing_id_; |
| 69 std::string device_id_salt_; | 69 std::string device_id_salt_; |
| 70 std::string group_id_salt_; | 70 std::string group_id_salt_; |
| 71 MediaStreamManager* media_stream_manager_; | 71 MediaStreamManager* media_stream_manager_; |
| 72 MediaDevicesPermissionChecker permission_checker_; | 72 std::unique_ptr<MediaDevicesPermissionChecker> permission_checker_; |
| 73 | 73 |
| 74 base::WeakPtrFactory<MediaDevicesDispatcherHost> weak_factory_; | 74 base::WeakPtrFactory<MediaDevicesDispatcherHost> weak_factory_; |
| 75 | 75 |
| 76 DISALLOW_COPY_AND_ASSIGN(MediaDevicesDispatcherHost); | 76 DISALLOW_COPY_AND_ASSIGN(MediaDevicesDispatcherHost); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace content | 79 } // namespace content |
| 80 | 80 |
| 81 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_DEVICES_DISPATCHER_HOST_H_ | 81 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_DEVICES_DISPATCHER_HOST_H_ |
| OLD | NEW |