| 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 #ifndef CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 // MediaStreamDispatcherEventHandler implementation. | 72 // MediaStreamDispatcherEventHandler implementation. |
| 73 void OnStreamGenerated(int request_id, | 73 void OnStreamGenerated(int request_id, |
| 74 const std::string& label, | 74 const std::string& label, |
| 75 const StreamDeviceInfoArray& audio_array, | 75 const StreamDeviceInfoArray& audio_array, |
| 76 const StreamDeviceInfoArray& video_array) override; | 76 const StreamDeviceInfoArray& video_array) override; |
| 77 void OnStreamGenerationFailed(int request_id, | 77 void OnStreamGenerationFailed(int request_id, |
| 78 MediaStreamRequestResult result) override; | 78 MediaStreamRequestResult result) override; |
| 79 void OnDeviceStopped(const std::string& label, | 79 void OnDeviceStopped(const std::string& label, |
| 80 const StreamDeviceInfo& device_info) override; | 80 const StreamDeviceInfo& device_info) override; |
| 81 void OnDevicesEnumerated(int request_id, | |
| 82 const StreamDeviceInfoArray& device_array) override; | |
| 83 void OnDeviceOpened(int request_id, | 81 void OnDeviceOpened(int request_id, |
| 84 const std::string& label, | 82 const std::string& label, |
| 85 const StreamDeviceInfo& device_info) override; | 83 const StreamDeviceInfo& device_info) override; |
| 86 void OnDeviceOpenFailed(int request_id) override; | 84 void OnDeviceOpenFailed(int request_id) override; |
| 87 void OnDevicesChanged() override; | |
| 88 | 85 |
| 89 // RenderFrameObserver override | 86 // RenderFrameObserver override |
| 90 void WillCommitProvisionalLoad() override; | 87 void WillCommitProvisionalLoad() override; |
| 91 | 88 |
| 92 void SetMediaDevicesDispatcherForTesting( | 89 void SetMediaDevicesDispatcherForTesting( |
| 93 ::mojom::MediaDevicesDispatcherHostPtr media_devices_dispatcher); | 90 ::mojom::MediaDevicesDispatcherHostPtr media_devices_dispatcher); |
| 94 | 91 |
| 95 protected: | 92 protected: |
| 96 // Called when |source| has been stopped from JavaScript. | 93 // Called when |source| has been stopped from JavaScript. |
| 97 void OnLocalSourceStopped(const blink::WebMediaStreamSource& source); | 94 void OnLocalSourceStopped(const blink::WebMediaStreamSource& source); |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 // Note: This member must be the last to ensure all outstanding weak pointers | 270 // Note: This member must be the last to ensure all outstanding weak pointers |
| 274 // are invalidated first. | 271 // are invalidated first. |
| 275 base::WeakPtrFactory<UserMediaClientImpl> weak_factory_; | 272 base::WeakPtrFactory<UserMediaClientImpl> weak_factory_; |
| 276 | 273 |
| 277 DISALLOW_COPY_AND_ASSIGN(UserMediaClientImpl); | 274 DISALLOW_COPY_AND_ASSIGN(UserMediaClientImpl); |
| 278 }; | 275 }; |
| 279 | 276 |
| 280 } // namespace content | 277 } // namespace content |
| 281 | 278 |
| 282 #endif // CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ | 279 #endif // CONTENT_RENDERER_MEDIA_USER_MEDIA_CLIENT_IMPL_H_ |
| OLD | NEW |