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

Side by Side Diff: chromecast/browser/media/cma_message_filter_host.cc

Issue 1142513004: Chromecast: MessageLoopProxy cleanup --> SingleThreadTaskRunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 "chromecast/browser/media/cma_message_filter_host.h" 5 #include "chromecast/browser/media/cma_message_filter_host.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 video_plane->SetGeometry( 133 video_plane->SetGeometry(
134 quad, 134 quad,
135 VideoPlane::COORDINATE_TYPE_GRAPHICS_PLANE); 135 VideoPlane::COORDINATE_TYPE_GRAPHICS_PLANE);
136 } 136 }
137 137
138 } // namespace 138 } // namespace
139 139
140 CmaMessageFilterHost::CmaMessageFilterHost(int render_process_id) 140 CmaMessageFilterHost::CmaMessageFilterHost(int render_process_id)
141 : content::BrowserMessageFilter(CastMediaMsgStart), 141 : content::BrowserMessageFilter(CastMediaMsgStart),
142 process_id_(render_process_id), 142 process_id_(render_process_id),
143 task_runner_(CmaMessageLoop::GetMessageLoopProxy()), 143 task_runner_(CmaMessageLoop::GetTaskRunner()),
144 weak_factory_(this) { 144 weak_factory_(this) {
145 weak_this_ = weak_factory_.GetWeakPtr(); 145 weak_this_ = weak_factory_.GetWeakPtr();
146 } 146 }
147 147
148 CmaMessageFilterHost::~CmaMessageFilterHost() { 148 CmaMessageFilterHost::~CmaMessageFilterHost() {
149 DCHECK(media_pipelines_.empty()); 149 DCHECK(media_pipelines_.empty());
150 } 150 }
151 151
152 void CmaMessageFilterHost::OnChannelClosing() { 152 void CmaMessageFilterHost::OnChannelClosing() {
153 content::BrowserMessageFilter::OnChannelClosing(); 153 content::BrowserMessageFilter::OnChannelClosing();
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 } 531 }
532 532
533 void CmaMessageFilterHost::OnNaturalSizeChanged( 533 void CmaMessageFilterHost::OnNaturalSizeChanged(
534 int media_id, TrackId track_id, const gfx::Size& size) { 534 int media_id, TrackId track_id, const gfx::Size& size) {
535 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); 535 DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
536 Send(new CmaMsg_NaturalSizeChanged(media_id, track_id, size)); 536 Send(new CmaMsg_NaturalSizeChanged(media_id, track_id, size));
537 } 537 }
538 538
539 } // namespace media 539 } // namespace media
540 } // namespace chromecast 540 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/media/cast_browser_cdm_factory.cc ('k') | chromecast/browser/media/cma_message_loop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698