OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |