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/renderer/media/media_channel_proxy.h" | 5 #include "chromecast/renderer/media/media_channel_proxy.h" |
6 | 6 |
| 7 #include <utility> |
| 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
8 #include "chromecast/common/media/cma_messages.h" | 10 #include "chromecast/common/media/cma_messages.h" |
9 | 11 |
10 namespace chromecast { | 12 namespace chromecast { |
11 namespace media { | 13 namespace media { |
12 | 14 |
13 MediaChannelProxy::MediaChannelProxy() | 15 MediaChannelProxy::MediaChannelProxy() |
14 : is_open_(false), | 16 : is_open_(false), |
15 id_(0) { | 17 id_(0) { |
16 filter_ = CmaMessageFilterProxy::Get(); | 18 filter_ = CmaMessageFilterProxy::Get(); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 bool MediaChannelProxy::SetVideoDelegate( | 67 bool MediaChannelProxy::SetVideoDelegate( |
66 const CmaMessageFilterProxy::VideoDelegate& video_delegate) { | 68 const CmaMessageFilterProxy::VideoDelegate& video_delegate) { |
67 if (!is_open_) | 69 if (!is_open_) |
68 return false; | 70 return false; |
69 return filter_->SetVideoDelegate(id_, video_delegate); | 71 return filter_->SetVideoDelegate(id_, video_delegate); |
70 } | 72 } |
71 | 73 |
72 bool MediaChannelProxy::Send(scoped_ptr<IPC::Message> message) { | 74 bool MediaChannelProxy::Send(scoped_ptr<IPC::Message> message) { |
73 if (!is_open_) | 75 if (!is_open_) |
74 return false; | 76 return false; |
75 return filter_->Send(message.Pass()); | 77 return filter_->Send(std::move(message)); |
76 } | 78 } |
77 | 79 |
78 } // namespace media | 80 } // namespace media |
79 } // namespace chromecast | 81 } // namespace chromecast |
OLD | NEW |