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

Side by Side Diff: chrome/renderer/media/cast_session.cc

Issue 2133083002: Remove all remaining traces of MessageLoopProxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_session.h" 5 #include "chrome/renderer/media/cast_session.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 28 matching lines...) Expand all
39 if (!shm->Map(size)) { 39 if (!shm->Map(size)) {
40 NOTREACHED() << "Map failed"; 40 NOTREACHED() << "Map failed";
41 } 41 }
42 callback.Run(std::move(shm)); 42 callback.Run(std::move(shm));
43 } 43 }
44 44
45 } // namespace 45 } // namespace
46 46
47 CastSession::CastSession() 47 CastSession::CastSession()
48 : delegate_(new CastSessionDelegate()), 48 : delegate_(new CastSessionDelegate()),
49 io_task_runner_( 49 io_task_runner_(content::RenderThread::Get()->GetIOTaskRunner()) {}
50 content::RenderThread::Get()->GetIOMessageLoopProxy()) {}
51 50
52 CastSession::~CastSession() { 51 CastSession::~CastSession() {
53 // We should always be able to delete the object on the IO thread. 52 // We should always be able to delete the object on the IO thread.
54 CHECK(io_task_runner_->DeleteSoon(FROM_HERE, delegate_.release())); 53 CHECK(io_task_runner_->DeleteSoon(FROM_HERE, delegate_.release()));
55 } 54 }
56 55
57 void CastSession::StartAudio(const media::cast::AudioSenderConfig& config, 56 void CastSession::StartAudio(const media::cast::AudioSenderConfig& config,
58 const AudioFrameInputAvailableCallback& callback, 57 const AudioFrameInputAvailableCallback& callback,
59 const ErrorCallback& error_callback) { 58 const ErrorCallback& error_callback) {
60 DCHECK(content::RenderThread::Get()); 59 DCHECK(content::RenderThread::Get());
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 122
124 void CastSession::GetStatsAndReset(bool is_audio, 123 void CastSession::GetStatsAndReset(bool is_audio,
125 const StatsCallback& callback) { 124 const StatsCallback& callback) {
126 io_task_runner_->PostTask( 125 io_task_runner_->PostTask(
127 FROM_HERE, 126 FROM_HERE,
128 base::Bind(&CastSessionDelegate::GetStatsAndReset, 127 base::Bind(&CastSessionDelegate::GetStatsAndReset,
129 base::Unretained(delegate_.get()), 128 base::Unretained(delegate_.get()),
130 is_audio, 129 is_audio,
131 media::BindToCurrentLoop(callback))); 130 media::BindToCurrentLoop(callback)));
132 } 131 }
OLDNEW
« no previous file with comments | « chrome/renderer/media/cast_receiver_session.cc ('k') | chrome/renderer/media/cast_session_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698