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

Unified Diff: content/renderer/media/video_capture_message_filter.cc

Issue 2390103002: Reland: VideoCapture: migrate VideoCapture renderer-->host messages to mojo, part 1 (Closed)
Patch Set: Sorted out tests after linker collision. Rebase Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/video_capture_message_filter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/video_capture_message_filter.cc
diff --git a/content/renderer/media/video_capture_message_filter.cc b/content/renderer/media/video_capture_message_filter.cc
index aad0da8e747140d83ce7216bd9e383734063b0c2..20a40b5a73df2cc47417ab09fff2e3ce83b10aa7 100644
--- a/content/renderer/media/video_capture_message_filter.cc
+++ b/content/renderer/media/video_capture_message_filter.cc
@@ -11,9 +11,7 @@
namespace content {
VideoCaptureMessageFilter::VideoCaptureMessageFilter()
- : last_device_id_(0),
- sender_(NULL) {
-}
+ : last_device_id_(0), channel_(nullptr) {}
void VideoCaptureMessageFilter::AddDelegate(Delegate* delegate) {
if (++last_device_id_ <= 0)
@@ -21,7 +19,7 @@ void VideoCaptureMessageFilter::AddDelegate(Delegate* delegate) {
while (delegates_.find(last_device_id_) != delegates_.end())
last_device_id_++;
- if (sender_) {
+ if (channel_) {
delegates_[last_device_id_] = delegate;
delegate->OnDelegateAdded(last_device_id_);
} else {
@@ -47,12 +45,12 @@ void VideoCaptureMessageFilter::RemoveDelegate(Delegate* delegate) {
}
bool VideoCaptureMessageFilter::Send(IPC::Message* message) {
- if (!sender_) {
+ if (!channel_) {
delete message;
return false;
}
- return sender_->Send(message);
+ return channel_->Send(message);
}
bool VideoCaptureMessageFilter::OnMessageReceived(const IPC::Message& message) {
@@ -74,7 +72,7 @@ bool VideoCaptureMessageFilter::OnMessageReceived(const IPC::Message& message) {
void VideoCaptureMessageFilter::OnFilterAdded(IPC::Channel* channel) {
DVLOG(1) << "VideoCaptureMessageFilter::OnFilterAdded()";
- sender_ = channel;
+ channel_ = channel;
for (const auto& pending_delegate : pending_delegates_) {
pending_delegate.second->OnDelegateAdded(pending_delegate.first);
@@ -84,11 +82,11 @@ void VideoCaptureMessageFilter::OnFilterAdded(IPC::Channel* channel) {
}
void VideoCaptureMessageFilter::OnFilterRemoved() {
- sender_ = NULL;
+ channel_ = nullptr;
}
void VideoCaptureMessageFilter::OnChannelClosing() {
- sender_ = NULL;
+ channel_ = nullptr;
}
VideoCaptureMessageFilter::~VideoCaptureMessageFilter() {}
« no previous file with comments | « content/renderer/media/video_capture_message_filter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698