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

Unified Diff: chrome/renderer/media/cast_ipc_dispatcher.cc

Issue 1123733002: [chrome/renderer/media] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nit Created 5 years, 7 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 | « chrome/renderer/media/cast_ipc_dispatcher.h ('k') | chrome/renderer/media/cast_ipc_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/media/cast_ipc_dispatcher.cc
diff --git a/chrome/renderer/media/cast_ipc_dispatcher.cc b/chrome/renderer/media/cast_ipc_dispatcher.cc
index a88103db8cc523aeaafc2487d8d66c383a60e44c..921a27d4409ca511b149d4759090fb59af1e8927 100644
--- a/chrome/renderer/media/cast_ipc_dispatcher.cc
+++ b/chrome/renderer/media/cast_ipc_dispatcher.cc
@@ -4,6 +4,7 @@
#include "chrome/renderer/media/cast_ipc_dispatcher.h"
+#include "base/single_thread_task_runner.h"
#include "chrome/common/cast_messages.h"
#include "chrome/renderer/media/cast_transport_sender_ipc.h"
#include "ipc/ipc_message_macros.h"
@@ -11,15 +12,15 @@
CastIPCDispatcher* CastIPCDispatcher::global_instance_ = NULL;
CastIPCDispatcher::CastIPCDispatcher(
- const scoped_refptr<base::MessageLoopProxy>& io_message_loop)
+ const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner)
: sender_(NULL),
- io_message_loop_(io_message_loop) {
- DCHECK(io_message_loop_.get());
+ io_task_runner_(io_task_runner) {
+ DCHECK(io_task_runner_.get());
DCHECK(!global_instance_);
}
CastIPCDispatcher::~CastIPCDispatcher() {
- DCHECK(io_message_loop_->BelongsToCurrentThread());
+ DCHECK(io_task_runner_->BelongsToCurrentThread());
DCHECK(!global_instance_);
}
@@ -28,7 +29,7 @@ CastIPCDispatcher* CastIPCDispatcher::Get() {
}
void CastIPCDispatcher::Send(IPC::Message* message) {
- DCHECK(io_message_loop_->BelongsToCurrentThread());
+ DCHECK(io_task_runner_->BelongsToCurrentThread());
if (sender_) {
sender_->Send(message);
} else {
@@ -45,7 +46,7 @@ void CastIPCDispatcher::RemoveSender(int32 channel_id) {
}
bool CastIPCDispatcher::OnMessageReceived(const IPC::Message& message) {
- DCHECK(io_message_loop_->BelongsToCurrentThread());
+ DCHECK(io_task_runner_->BelongsToCurrentThread());
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(CastIPCDispatcher, message)
IPC_MESSAGE_HANDLER(CastMsg_NotifyStatusChange, OnNotifyStatusChange)
@@ -59,21 +60,21 @@ bool CastIPCDispatcher::OnMessageReceived(const IPC::Message& message) {
}
void CastIPCDispatcher::OnFilterAdded(IPC::Sender* sender) {
- DCHECK(io_message_loop_->BelongsToCurrentThread());
+ DCHECK(io_task_runner_->BelongsToCurrentThread());
DCHECK(!global_instance_);
global_instance_ = this;
sender_ = sender;
}
void CastIPCDispatcher::OnFilterRemoved() {
- DCHECK(io_message_loop_->BelongsToCurrentThread());
+ DCHECK(io_task_runner_->BelongsToCurrentThread());
DCHECK_EQ(this, global_instance_);
global_instance_ = NULL;
sender_ = NULL;
}
void CastIPCDispatcher::OnChannelClosing() {
- DCHECK(io_message_loop_->BelongsToCurrentThread());
+ DCHECK(io_task_runner_->BelongsToCurrentThread());
DCHECK_EQ(this, global_instance_);
}
« no previous file with comments | « chrome/renderer/media/cast_ipc_dispatcher.h ('k') | chrome/renderer/media/cast_ipc_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698