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

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

Issue 1873293002: Report if video capturing meets output protection requirement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed oshima's comments. Created 4 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 (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 // MediaStreamManager is used to open/enumerate media capture devices (video 5 // MediaStreamManager is used to open/enumerate media capture devices (video
6 // supported now). Call flow: 6 // supported now). Call flow:
7 // 1. GenerateStream is called when a render process wants to use a capture 7 // 1. GenerateStream is called when a render process wants to use a capture
8 // device. 8 // device.
9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to 9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to
10 // use devices and for which device to use. 10 // use devices and for which device to use.
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 static bool DoesMediaDeviceIDMatchHMAC( 248 static bool DoesMediaDeviceIDMatchHMAC(
249 const ResourceContext::SaltCallback& sc, 249 const ResourceContext::SaltCallback& sc,
250 const url::Origin& security_origin, 250 const url::Origin& security_origin,
251 const std::string& device_guid, 251 const std::string& device_guid,
252 const std::string& raw_unique_id); 252 const std::string& raw_unique_id);
253 253
254 // Returns true if the renderer process identified with |render_process_id| 254 // Returns true if the renderer process identified with |render_process_id|
255 // is allowed to access |origin|. 255 // is allowed to access |origin|.
256 static bool IsOriginAllowed(int render_process_id, const url::Origin& origin); 256 static bool IsOriginAllowed(int render_process_id, const url::Origin& origin);
257 257
258 void SetCapturingLinkSecured(int render_process_id,
nasko 2016/05/11 16:42:56 nit: Add a comment to be consistent with the rest
xjz 2016/05/11 18:07:23 Done.
259 int session_id,
260 content::MediaStreamType type,
261 bool is_secure);
262
258 private: 263 private:
259 // Contains all data needed to keep track of requests. 264 // Contains all data needed to keep track of requests.
260 class DeviceRequest; 265 class DeviceRequest;
261 266
262 // Cache enumerated device list. 267 // Cache enumerated device list.
263 struct EnumerationCache { 268 struct EnumerationCache {
264 EnumerationCache(); 269 EnumerationCache();
265 ~EnumerationCache(); 270 ~EnumerationCache();
266 271
267 bool valid; 272 bool valid;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 463
459 // Objects subscribed to changes in the set of media devices. 464 // Objects subscribed to changes in the set of media devices.
460 std::vector<MediaStreamRequester*> device_change_subscribers_; 465 std::vector<MediaStreamRequester*> device_change_subscribers_;
461 466
462 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); 467 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager);
463 }; 468 };
464 469
465 } // namespace content 470 } // namespace content
466 471
467 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ 472 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698