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

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

Issue 1987643002: Make default media device ID salts random by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change return type from const string to string as it makes no difference Created 4 years, 6 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 (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_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 15 matching lines...) Expand all
26 class MediaStreamUIProxy; 26 class MediaStreamUIProxy;
27 class ResourceContext; 27 class ResourceContext;
28 28
29 // MediaStreamDispatcherHost is a delegate for Media Stream API messages used by 29 // MediaStreamDispatcherHost is a delegate for Media Stream API messages used by
30 // MediaStreamImpl. There is one MediaStreamDispatcherHost per 30 // MediaStreamImpl. There is one MediaStreamDispatcherHost per
31 // RenderProcessHost, the former owned by the latter. 31 // RenderProcessHost, the former owned by the latter.
32 class CONTENT_EXPORT MediaStreamDispatcherHost : public BrowserMessageFilter, 32 class CONTENT_EXPORT MediaStreamDispatcherHost : public BrowserMessageFilter,
33 public MediaStreamRequester { 33 public MediaStreamRequester {
34 public: 34 public:
35 MediaStreamDispatcherHost(int render_process_id, 35 MediaStreamDispatcherHost(int render_process_id,
36 const ResourceContext::SaltCallback& salt_callback, 36 const std::string& salt,
37 MediaStreamManager* media_stream_manager, 37 MediaStreamManager* media_stream_manager,
38 bool use_fake_ui = false); 38 bool use_fake_ui = false);
39 39
40 // MediaStreamRequester implementation. 40 // MediaStreamRequester implementation.
41 void StreamGenerated(int render_frame_id, 41 void StreamGenerated(int render_frame_id,
42 int page_request_id, 42 int page_request_id,
43 const std::string& label, 43 const std::string& label,
44 const StreamDeviceInfoArray& audio_devices, 44 const StreamDeviceInfoArray& audio_devices,
45 const StreamDeviceInfoArray& video_devices) override; 45 const StreamDeviceInfoArray& video_devices) override;
46 void StreamGenerationFailed( 46 void StreamGenerationFailed(
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void OnSetCapturingLinkSecured(int session_id, 111 void OnSetCapturingLinkSecured(int session_id,
112 content::MediaStreamType type, 112 content::MediaStreamType type,
113 bool is_secure); 113 bool is_secure);
114 114
115 std::unique_ptr<MediaStreamUIProxy> CreateMediaStreamUIProxy(); 115 std::unique_ptr<MediaStreamUIProxy> CreateMediaStreamUIProxy();
116 void HandleCheckAccessResponse(std::unique_ptr<MediaStreamUIProxy> ui_proxy, 116 void HandleCheckAccessResponse(std::unique_ptr<MediaStreamUIProxy> ui_proxy,
117 int render_frame_id, 117 int render_frame_id,
118 bool have_access); 118 bool have_access);
119 119
120 int render_process_id_; 120 int render_process_id_;
121 ResourceContext::SaltCallback salt_callback_; 121 std::string salt_;
122 MediaStreamManager* media_stream_manager_; 122 MediaStreamManager* media_stream_manager_;
123 123
124 struct DeviceChangeSubscriberInfo { 124 struct DeviceChangeSubscriberInfo {
125 int render_frame_id; 125 int render_frame_id;
126 url::Origin security_origin; 126 url::Origin security_origin;
127 }; 127 };
128 std::vector<DeviceChangeSubscriberInfo> device_change_subscribers_; 128 std::vector<DeviceChangeSubscriberInfo> device_change_subscribers_;
129 bool use_fake_ui_; 129 bool use_fake_ui_;
130 130
131 base::WeakPtrFactory<MediaStreamDispatcherHost> weak_factory_; 131 base::WeakPtrFactory<MediaStreamDispatcherHost> weak_factory_;
132 132
133 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcherHost); 133 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcherHost);
134 }; 134 };
135 135
136 } // namespace content 136 } // namespace content
137 137
138 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_ 138 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698