OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/renderer/media/aec_dump_message_filter.h" | 5 #include "content/renderer/media/aec_dump_message_filter.h" |
6 | 6 |
7 #include "base/single_thread_task_runner.h" | 7 #include "base/single_thread_task_runner.h" |
8 #include "content/common/media/aec_dump_messages.h" | 8 #include "content/common/media/aec_dump_messages.h" |
9 #include "content/renderer/media/webrtc_logging.h" | 9 #include "content/renderer/media/webrtc_logging.h" |
10 #include "ipc/ipc_logging.h" | 10 #include "ipc/ipc_logging.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 DCHECK(io_task_runner_->BelongsToCurrentThread()); | 87 DCHECK(io_task_runner_->BelongsToCurrentThread()); |
88 bool handled = true; | 88 bool handled = true; |
89 IPC_BEGIN_MESSAGE_MAP(AecDumpMessageFilter, message) | 89 IPC_BEGIN_MESSAGE_MAP(AecDumpMessageFilter, message) |
90 IPC_MESSAGE_HANDLER(AecDumpMsg_EnableAecDump, OnEnableAecDump) | 90 IPC_MESSAGE_HANDLER(AecDumpMsg_EnableAecDump, OnEnableAecDump) |
91 IPC_MESSAGE_HANDLER(AecDumpMsg_DisableAecDump, OnDisableAecDump) | 91 IPC_MESSAGE_HANDLER(AecDumpMsg_DisableAecDump, OnDisableAecDump) |
92 IPC_MESSAGE_UNHANDLED(handled = false) | 92 IPC_MESSAGE_UNHANDLED(handled = false) |
93 IPC_END_MESSAGE_MAP() | 93 IPC_END_MESSAGE_MAP() |
94 return handled; | 94 return handled; |
95 } | 95 } |
96 | 96 |
97 void AecDumpMessageFilter::OnFilterAdded(IPC::Sender* sender) { | 97 void AecDumpMessageFilter::OnFilterAdded(IPC::Channel* channel) { |
98 DCHECK(io_task_runner_->BelongsToCurrentThread()); | 98 DCHECK(io_task_runner_->BelongsToCurrentThread()); |
99 sender_ = sender; | 99 sender_ = channel; |
100 } | 100 } |
101 | 101 |
102 void AecDumpMessageFilter::OnFilterRemoved() { | 102 void AecDumpMessageFilter::OnFilterRemoved() { |
103 DCHECK(io_task_runner_->BelongsToCurrentThread()); | 103 DCHECK(io_task_runner_->BelongsToCurrentThread()); |
104 | 104 |
105 // Once removed, a filter will not be used again. At this time the | 105 // Once removed, a filter will not be used again. At this time the |
106 // observer must be notified so it releases its reference. | 106 // observer must be notified so it releases its reference. |
107 OnChannelClosing(); | 107 OnChannelClosing(); |
108 } | 108 } |
109 | 109 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 167 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
168 for (DelegateMap::iterator it = delegates_.begin(); | 168 for (DelegateMap::iterator it = delegates_.begin(); |
169 it != delegates_.end(); ++it) { | 169 it != delegates_.end(); ++it) { |
170 if (it->second == delegate) | 170 if (it->second == delegate) |
171 return it->first; | 171 return it->first; |
172 } | 172 } |
173 return kInvalidDelegateId; | 173 return kInvalidDelegateId; |
174 } | 174 } |
175 | 175 |
176 } // namespace content | 176 } // namespace content |
OLD | NEW |