Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(537)

Side by Side Diff: content/browser/renderer_host/media/media_devices_dispatcher_host.h

Issue 2851173004: Eliminate bind callback that doesn't take a BindSourceInfo parameter. (Closed)
Patch Set: . Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "content/browser/media/media_devices_permission_checker.h" 13 #include "content/browser/media/media_devices_permission_checker.h"
14 #include "content/browser/renderer_host/media/media_devices_manager.h" 14 #include "content/browser/renderer_host/media/media_devices_manager.h"
15 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 #include "content/common/media/media_devices.mojom.h" 16 #include "content/common/media/media_devices.mojom.h"
17 #include "media/capture/video/video_capture_device_descriptor.h" 17 #include "media/capture/video/video_capture_device_descriptor.h"
18 18
19 using ::mojom::MediaDeviceType; 19 using ::mojom::MediaDeviceType;
20 20
21 namespace service_manager {
22 struct BindSourceInfo;
23 }
24
21 namespace url { 25 namespace url {
22 class Origin; 26 class Origin;
23 } 27 }
24 28
25 namespace content { 29 namespace content {
26 30
27 class MediaStreamManager; 31 class MediaStreamManager;
28 32
29 class CONTENT_EXPORT MediaDevicesDispatcherHost 33 class CONTENT_EXPORT MediaDevicesDispatcherHost
30 : public ::mojom::MediaDevicesDispatcherHost, 34 : public ::mojom::MediaDevicesDispatcherHost,
31 public MediaDeviceChangeSubscriber { 35 public MediaDeviceChangeSubscriber {
32 public: 36 public:
33 MediaDevicesDispatcherHost(int render_process_id, 37 MediaDevicesDispatcherHost(int render_process_id,
34 int render_frame_id, 38 int render_frame_id,
35 const std::string& device_id_salt, 39 const std::string& device_id_salt,
36 MediaStreamManager* media_stream_manager); 40 MediaStreamManager* media_stream_manager);
37 ~MediaDevicesDispatcherHost() override; 41 ~MediaDevicesDispatcherHost() override;
38 42
39 static void Create(int render_process_id, 43 static void Create(int render_process_id,
40 int render_frame_id, 44 int render_frame_id,
41 const std::string& device_id_salt, 45 const std::string& device_id_salt,
42 MediaStreamManager* media_stream_manager, 46 MediaStreamManager* media_stream_manager,
47 const service_manager::BindSourceInfo& source_info,
43 ::mojom::MediaDevicesDispatcherHostRequest request); 48 ::mojom::MediaDevicesDispatcherHostRequest request);
44 49
45 // ::mojom::MediaDevicesDispatcherHost implementation. 50 // ::mojom::MediaDevicesDispatcherHost implementation.
46 void EnumerateDevices(bool request_audio_input, 51 void EnumerateDevices(bool request_audio_input,
47 bool request_video_input, 52 bool request_video_input,
48 bool request_audio_output, 53 bool request_audio_output,
49 const url::Origin& security_origin, 54 const url::Origin& security_origin,
50 EnumerateDevicesCallback client_callback) override; 55 EnumerateDevicesCallback client_callback) override;
51 void GetVideoInputCapabilities( 56 void GetVideoInputCapabilities(
52 const url::Origin& security_origin, 57 const url::Origin& security_origin,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 ::mojom::MediaDevicesListenerPtr device_change_listener_; 123 ::mojom::MediaDevicesListenerPtr device_change_listener_;
119 124
120 base::WeakPtrFactory<MediaDevicesDispatcherHost> weak_factory_; 125 base::WeakPtrFactory<MediaDevicesDispatcherHost> weak_factory_;
121 126
122 DISALLOW_COPY_AND_ASSIGN(MediaDevicesDispatcherHost); 127 DISALLOW_COPY_AND_ASSIGN(MediaDevicesDispatcherHost);
123 }; 128 };
124 129
125 } // namespace content 130 } // namespace content
126 131
127 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_DEVICES_DISPATCHER_HOST_H_ 132 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_DEVICES_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698