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

Unified Diff: chromecast/renderer/media/media_channel_proxy.cc

Issue 2300993003: CmaRenderer is dead. Long live MojoRenderer. (Closed)
Patch Set: update OWNERS file Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromecast/renderer/media/media_channel_proxy.h ('k') | chromecast/renderer/media/media_pipeline_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/renderer/media/media_channel_proxy.cc
diff --git a/chromecast/renderer/media/media_channel_proxy.cc b/chromecast/renderer/media/media_channel_proxy.cc
deleted file mode 100644
index e4891fd6eac83ac2893e0bc3fc6bfe53138df3e8..0000000000000000000000000000000000000000
--- a/chromecast/renderer/media/media_channel_proxy.cc
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chromecast/renderer/media/media_channel_proxy.h"
-
-#include <utility>
-
-#include "base/logging.h"
-#include "chromecast/common/media/cma_messages.h"
-
-namespace chromecast {
-namespace media {
-
-MediaChannelProxy::MediaChannelProxy()
- : is_open_(false),
- id_(0) {
- filter_ = CmaMessageFilterProxy::Get();
- DCHECK(filter_.get());
-}
-
-MediaChannelProxy::~MediaChannelProxy() {
-}
-
-void MediaChannelProxy::Open(LoadType load_type) {
- CHECK(!is_open_);
- // Renderer side.
- id_ = filter_->CreateChannel();
- is_open_ = true;
-
- // Browser side.
- bool success = Send(std::unique_ptr<IPC::Message>(
- new CmaHostMsg_CreateMedia(id_, load_type)));
- if (!success) {
- is_open_ = false;
- id_ = 0;
- }
-}
-
-void MediaChannelProxy::Close() {
- if (!is_open_)
- return;
-
- // Browser side.
- Send(std::unique_ptr<IPC::Message>(new CmaHostMsg_DestroyMedia(id_)));
-
- // Renderer side.
- is_open_ = false;
- filter_->DestroyChannel(id_);
- id_ = 0;
-}
-
-bool MediaChannelProxy::SetMediaDelegate(
- const CmaMessageFilterProxy::MediaDelegate& media_delegate) {
- if (!is_open_)
- return false;
- return filter_->SetMediaDelegate(id_, media_delegate);
-}
-
-bool MediaChannelProxy::SetAudioDelegate(
- const CmaMessageFilterProxy::AudioDelegate& audio_delegate) {
- if (!is_open_)
- return false;
- return filter_->SetAudioDelegate(id_, audio_delegate);
-}
-
-bool MediaChannelProxy::SetVideoDelegate(
- const CmaMessageFilterProxy::VideoDelegate& video_delegate) {
- if (!is_open_)
- return false;
- return filter_->SetVideoDelegate(id_, video_delegate);
-}
-
-bool MediaChannelProxy::Send(std::unique_ptr<IPC::Message> message) {
- if (!is_open_)
- return false;
- return filter_->Send(std::move(message));
-}
-
-} // namespace media
-} // namespace chromecast
« no previous file with comments | « chromecast/renderer/media/media_channel_proxy.h ('k') | chromecast/renderer/media/media_pipeline_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698