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

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

Issue 562263002: Check media permissions through RenderFrameHostDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@render_frame_get_sources
Patch Set: Rebase Created 6 years, 3 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 void FinalizeRequestFailed(const std::string& label, 314 void FinalizeRequestFailed(const std::string& label,
315 DeviceRequest* request, 315 DeviceRequest* request,
316 content::MediaStreamRequestResult result); 316 content::MediaStreamRequestResult result);
317 void FinalizeOpenDevice(const std::string& label, 317 void FinalizeOpenDevice(const std::string& label,
318 DeviceRequest* request); 318 DeviceRequest* request);
319 void FinalizeMediaAccessRequest(const std::string& label, 319 void FinalizeMediaAccessRequest(const std::string& label,
320 DeviceRequest* request, 320 DeviceRequest* request,
321 const MediaStreamDevices& devices); 321 const MediaStreamDevices& devices);
322 void FinalizeEnumerateDevices(const std::string& label, 322 void FinalizeEnumerateDevices(const std::string& label,
323 DeviceRequest* request); 323 DeviceRequest* request);
324
325 // Checks for media access. Overridden by unit tests.
326 virtual bool CheckMediaAccessPermissionOnUIThread(int render_process_id,
327 const GURL& security_origin,
328 MediaStreamType type);
329 void HandleCheckMediaAccessResponse(const std::string& label, 324 void HandleCheckMediaAccessResponse(const std::string& label,
330 bool have_access); 325 bool have_access);
331 326
332 // This method is called when an audio or video device is plugged in or 327 // This method is called when an audio or video device is plugged in or
333 // removed. It make sure all MediaStreams that use a removed device is 328 // removed. It make sure all MediaStreams that use a removed device is
334 // stopped and that the render process is notified. |old_devices| is the list 329 // stopped and that the render process is notified. |old_devices| is the list
335 // of previously available devices. |new_devices| is the new 330 // of previously available devices. |new_devices| is the new
336 // list of currently available devices. 331 // list of currently available devices.
337 void StopRemovedDevices(const StreamDeviceInfoArray& old_devices, 332 void StopRemovedDevices(const StreamDeviceInfoArray& old_devices,
338 const StreamDeviceInfoArray& new_devices); 333 const StreamDeviceInfoArray& new_devices);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 394
400 bool use_fake_ui_; 395 bool use_fake_ui_;
401 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; 396 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_;
402 397
403 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); 398 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager);
404 }; 399 };
405 400
406 } // namespace content 401 } // namespace content
407 402
408 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ 403 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698