| Index: content/browser/renderer_host/media/video_capture_manager.cc
|
| diff --git a/content/browser/renderer_host/media/video_capture_manager.cc b/content/browser/renderer_host/media/video_capture_manager.cc
|
| index 6568407bdfdf5042ebdc69c83106492945788bb9..3b48bece3508c7571f84e810d98ac56ef57eb573 100644
|
| --- a/content/browser/renderer_host/media/video_capture_manager.cc
|
| +++ b/content/browser/renderer_host/media/video_capture_manager.cc
|
| @@ -96,13 +96,25 @@ VideoCaptureManager::VideoCaptureManager(
|
| scoped_ptr<media::VideoCaptureDeviceFactory> factory)
|
| : listener_(NULL),
|
| new_capture_session_id_(1),
|
| - video_capture_device_factory_(factory.Pass()) {
|
| + video_capture_device_factory_(factory.Pass()),
|
| + display_rotation_(gfx::Display::ROTATE_0) {
|
| }
|
|
|
| VideoCaptureManager::~VideoCaptureManager() {
|
| DCHECK(devices_.empty());
|
| }
|
|
|
| +void VideoCaptureManager::SetDisplayRotation(gfx::Display::Rotation rotation) {
|
| + DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| + display_rotation_ = rotation;
|
| + for (DeviceEntries::iterator it = devices_.begin();
|
| + it != devices_.end(); ++it) {
|
| + DeviceEntry* device = *it;
|
| + if (device->stream_type == MEDIA_DEVICE_VIDEO_CAPTURE)
|
| + device->video_capture_controller->set_display_rotation(display_rotation_);
|
| + }
|
| +}
|
| +
|
| void VideoCaptureManager::Register(
|
| MediaStreamProviderListener* listener,
|
| const scoped_refptr<base::SingleThreadTaskRunner>& device_task_runner) {
|
| @@ -579,6 +591,9 @@ VideoCaptureManager::DeviceEntry* VideoCaptureManager::GetOrCreateDeviceEntry(
|
|
|
| scoped_ptr<VideoCaptureController> video_capture_controller(
|
| new VideoCaptureController());
|
| +
|
| + if (device_info.type == MEDIA_DEVICE_VIDEO_CAPTURE)
|
| + video_capture_controller->set_display_rotation(display_rotation_);
|
| DeviceEntry* new_device = new DeviceEntry(device_info.type,
|
| device_info.id,
|
| video_capture_controller.Pass());
|
|
|