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

Side by Side Diff: content/browser/renderer_host/media/video_capture_host.cc

Issue 165333004: Revert "Allow MessageFilters to restrict listening to specific message classes" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 #include "content/browser/renderer_host/media/video_capture_host.h" 5 #include "content/browser/renderer_host/media/video_capture_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/browser/browser_main_loop.h" 9 #include "content/browser/browser_main_loop.h"
10 #include "content/browser/renderer_host/media/media_stream_manager.h" 10 #include "content/browser/renderer_host/media/media_stream_manager.h"
11 #include "content/browser/renderer_host/media/video_capture_manager.h" 11 #include "content/browser/renderer_host/media/video_capture_manager.h"
12 #include "content/common/media/video_capture_messages.h" 12 #include "content/common/media/video_capture_messages.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 VideoCaptureHost::VideoCaptureHost(MediaStreamManager* media_stream_manager) 16 VideoCaptureHost::VideoCaptureHost(MediaStreamManager* media_stream_manager)
17 : BrowserMessageFilter(VideoCaptureMsgStart), 17 : media_stream_manager_(media_stream_manager) {
18 media_stream_manager_(media_stream_manager) {
19 } 18 }
20 19
21 VideoCaptureHost::~VideoCaptureHost() {} 20 VideoCaptureHost::~VideoCaptureHost() {}
22 21
23 void VideoCaptureHost::OnChannelClosing() { 22 void VideoCaptureHost::OnChannelClosing() {
24 // Since the IPC channel is gone, close all requested VideoCaptureDevices. 23 // Since the IPC channel is gone, close all requested VideoCaptureDevices.
25 for (EntryMap::iterator it = entries_.begin(); it != entries_.end(); ) { 24 for (EntryMap::iterator it = entries_.begin(); it != entries_.end(); ) {
26 const base::WeakPtr<VideoCaptureController>& controller = it->second; 25 const base::WeakPtr<VideoCaptureController>& controller = it->second;
27 if (controller) { 26 if (controller) {
28 VideoCaptureControllerID controller_id(it->first); 27 VideoCaptureControllerID controller_id(it->first);
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 return; 312 return;
314 313
315 if (it->second) { 314 if (it->second) {
316 media_stream_manager_->video_capture_manager()->StopCaptureForClient( 315 media_stream_manager_->video_capture_manager()->StopCaptureForClient(
317 it->second.get(), controller_id, this); 316 it->second.get(), controller_id, this);
318 } 317 }
319 entries_.erase(it); 318 entries_.erase(it);
320 } 319 }
321 320
322 } // namespace content 321 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698