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

Side by Side Diff: content/browser/media/android/browser_demuxer_android.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 "content/browser/media/android/browser_demuxer_android.h" 5 #include "content/browser/media/android/browser_demuxer_android.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "content/common/media/media_player_messages_android.h" 8 #include "content/common/media/media_player_messages_android.h"
9 #include "media/base/android/media_task_runner.h" 9 #include "media/base/android/media_task_runner.h"
10 #include "media/base/media_switches.h" 10 #include "media/base/media_switches.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 DISALLOW_COPY_AND_ASSIGN(Internal); 54 DISALLOW_COPY_AND_ASSIGN(Internal);
55 }; 55 };
56 56
57 BrowserDemuxerAndroid::BrowserDemuxerAndroid() 57 BrowserDemuxerAndroid::BrowserDemuxerAndroid()
58 : BrowserMessageFilter(MediaPlayerMsgStart) { 58 : BrowserMessageFilter(MediaPlayerMsgStart) {
59 const bool use_media_thread = media::UseMediaThreadForMediaPlayback(); 59 const bool use_media_thread = media::UseMediaThreadForMediaPlayback();
60 VLOG(1) << "Using " << (use_media_thread ? "media" : "UI") << " thread" 60 VLOG(1) << "Using " << (use_media_thread ? "media" : "UI") << " thread"
61 << " for MSE playback"; 61 << " for MSE playback";
62 task_runner_ = 62 task_runner_ =
63 use_media_thread ? 63 use_media_thread
64 media::GetMediaTaskRunner().get() : 64 ? media::GetMediaTaskRunner().get()
65 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI).get(); 65 : BrowserThread::GetTaskRunnerForThread(BrowserThread::UI).get();
66
67 } 66 }
68 67
69 BrowserDemuxerAndroid::~BrowserDemuxerAndroid() {} 68 BrowserDemuxerAndroid::~BrowserDemuxerAndroid() {}
70 69
71 base::TaskRunner* BrowserDemuxerAndroid::OverrideTaskRunnerForMessage( 70 base::TaskRunner* BrowserDemuxerAndroid::OverrideTaskRunnerForMessage(
72 const IPC::Message& message) { 71 const IPC::Message& message) {
73 72
74 switch (message.type()) { 73 switch (message.type()) {
75 case MediaPlayerHostMsg_DemuxerReady::ID: 74 case MediaPlayerHostMsg_DemuxerReady::ID:
76 case MediaPlayerHostMsg_ReadFromDemuxerAck::ID: 75 case MediaPlayerHostMsg_ReadFromDemuxerAck::ID:
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 media::DemuxerAndroidClient* client = 170 media::DemuxerAndroidClient* client =
172 demuxer_clients_.Lookup(demuxer_client_id); 171 demuxer_clients_.Lookup(demuxer_client_id);
173 172
174 if (client) 173 if (client)
175 client->OnDemuxerDurationChanged(duration); 174 client->OnDemuxerDurationChanged(duration);
176 else 175 else
177 pending_configs_[demuxer_client_id].duration = duration; 176 pending_configs_[demuxer_client_id].duration = duration;
178 } 177 }
179 178
180 } // namespace content 179 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/temporary_file_stream.cc ('k') | content/browser/media/capture/aura_window_capture_machine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698