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 #include "content/renderer/media/media_devices_event_dispatcher.h" | 5 #include "content/renderer/media/media_devices_event_dispatcher.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 void MediaDevicesEventDispatcher::SetMediaDevicesDispatcherForTesting( | 115 void MediaDevicesEventDispatcher::SetMediaDevicesDispatcherForTesting( |
116 ::mojom::MediaDevicesDispatcherHostPtr media_devices_dispatcher) { | 116 ::mojom::MediaDevicesDispatcherHostPtr media_devices_dispatcher) { |
117 media_devices_dispatcher_ = std::move(media_devices_dispatcher); | 117 media_devices_dispatcher_ = std::move(media_devices_dispatcher); |
118 } | 118 } |
119 | 119 |
120 const ::mojom::MediaDevicesDispatcherHostPtr& | 120 const ::mojom::MediaDevicesDispatcherHostPtr& |
121 MediaDevicesEventDispatcher::GetMediaDevicesDispatcher() { | 121 MediaDevicesEventDispatcher::GetMediaDevicesDispatcher() { |
122 if (!media_devices_dispatcher_) { | 122 if (!media_devices_dispatcher_) { |
123 render_frame()->GetRemoteInterfaces()->GetInterface( | 123 render_frame()->GetRemoteInterfaces()->GetInterface( |
124 mojo::GetProxy(&media_devices_dispatcher_)); | 124 mojo::MakeRequest(&media_devices_dispatcher_)); |
125 } | 125 } |
126 | 126 |
127 return media_devices_dispatcher_; | 127 return media_devices_dispatcher_; |
128 } | 128 } |
129 | 129 |
130 } // namespace content | 130 } // namespace content |
OLD | NEW |