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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
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 "chrome/renderer/media/cast_ipc_dispatcher.h" 5 #include "chrome/renderer/media/cast_ipc_dispatcher.h"
6 6
7 #include "base/single_thread_task_runner.h"
7 #include "chrome/common/cast_messages.h" 8 #include "chrome/common/cast_messages.h"
8 #include "chrome/renderer/media/cast_transport_sender_ipc.h" 9 #include "chrome/renderer/media/cast_transport_sender_ipc.h"
9 #include "ipc/ipc_message_macros.h" 10 #include "ipc/ipc_message_macros.h"
10 11
11 CastIPCDispatcher* CastIPCDispatcher::global_instance_ = NULL; 12 CastIPCDispatcher* CastIPCDispatcher::global_instance_ = NULL;
12 13
13 CastIPCDispatcher::CastIPCDispatcher( 14 CastIPCDispatcher::CastIPCDispatcher(
14 const scoped_refptr<base::MessageLoopProxy>& io_message_loop) 15 const scoped_refptr<base::SingleThreadTaskRunner>& io_message_loop)
15 : sender_(NULL), 16 : sender_(NULL),
16 io_message_loop_(io_message_loop) { 17 io_message_loop_(io_message_loop) {
17 DCHECK(io_message_loop_.get()); 18 DCHECK(io_message_loop_.get());
18 DCHECK(!global_instance_); 19 DCHECK(!global_instance_);
19 } 20 }
20 21
21 CastIPCDispatcher::~CastIPCDispatcher() { 22 CastIPCDispatcher::~CastIPCDispatcher() {
22 DCHECK(io_message_loop_->BelongsToCurrentThread()); 23 DCHECK(io_message_loop_->BelongsToCurrentThread());
23 DCHECK(!global_instance_); 24 DCHECK(!global_instance_);
24 } 25 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 void CastIPCDispatcher::OnReceivedPacket( 128 void CastIPCDispatcher::OnReceivedPacket(
128 int32 channel_id, 129 int32 channel_id,
129 const media::cast::Packet& packet) { 130 const media::cast::Packet& packet) {
130 CastTransportSenderIPC* sender = id_map_.Lookup(channel_id); 131 CastTransportSenderIPC* sender = id_map_.Lookup(channel_id);
131 if (sender) { 132 if (sender) {
132 sender->OnReceivedPacket(packet); 133 sender->OnReceivedPacket(packet);
133 } else { 134 } else {
134 DVLOG(1) << "CastIPCDispatcher::OnReceievdPacket on non-existing channel."; 135 DVLOG(1) << "CastIPCDispatcher::OnReceievdPacket on non-existing channel.";
135 } 136 }
136 } 137 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698