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 #ifndef CHROMECAST_RENDERER_MEDIA_MEDIA_CHANNEL_PROXY_H_ | 5 #ifndef CHROMECAST_RENDERER_MEDIA_MEDIA_CHANNEL_PROXY_H_ |
6 #define CHROMECAST_RENDERER_MEDIA_MEDIA_CHANNEL_PROXY_H_ | 6 #define CHROMECAST_RENDERER_MEDIA_MEDIA_CHANNEL_PROXY_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "chromecast/media/cma/pipeline/load_type.h" | 12 #include "chromecast/media/cma/pipeline/load_type.h" |
12 #include "chromecast/renderer/media/cma_message_filter_proxy.h" | 13 #include "chromecast/renderer/media/cma_message_filter_proxy.h" |
13 | 14 |
14 namespace IPC { | 15 namespace IPC { |
15 class Message; | 16 class Message; |
16 } | 17 } |
17 | 18 |
18 namespace chromecast { | 19 namespace chromecast { |
19 namespace media { | 20 namespace media { |
20 | 21 |
(...skipping 16 matching lines...) Expand all Loading... |
37 | 38 |
38 // Manages delegates. | 39 // Manages delegates. |
39 bool SetMediaDelegate( | 40 bool SetMediaDelegate( |
40 const CmaMessageFilterProxy::MediaDelegate& media_delegate); | 41 const CmaMessageFilterProxy::MediaDelegate& media_delegate); |
41 bool SetAudioDelegate( | 42 bool SetAudioDelegate( |
42 const CmaMessageFilterProxy::AudioDelegate& audio_delegate); | 43 const CmaMessageFilterProxy::AudioDelegate& audio_delegate); |
43 bool SetVideoDelegate( | 44 bool SetVideoDelegate( |
44 const CmaMessageFilterProxy::VideoDelegate& video_delegate); | 45 const CmaMessageFilterProxy::VideoDelegate& video_delegate); |
45 | 46 |
46 // Sends an IPC message over this CMA ipc channel. | 47 // Sends an IPC message over this CMA ipc channel. |
47 bool Send(scoped_ptr<IPC::Message> message); | 48 bool Send(std::unique_ptr<IPC::Message> message); |
48 | 49 |
49 private: | 50 private: |
50 friend class base::RefCountedThreadSafe<MediaChannelProxy>; | 51 friend class base::RefCountedThreadSafe<MediaChannelProxy>; |
51 virtual ~MediaChannelProxy(); | 52 virtual ~MediaChannelProxy(); |
52 | 53 |
53 // Message filter running on the renderer side. | 54 // Message filter running on the renderer side. |
54 scoped_refptr<CmaMessageFilterProxy> filter_; | 55 scoped_refptr<CmaMessageFilterProxy> filter_; |
55 | 56 |
56 // Indicates whether the CMA channel is open. | 57 // Indicates whether the CMA channel is open. |
57 bool is_open_; | 58 bool is_open_; |
58 | 59 |
59 // Unique identifier per media pipeline. | 60 // Unique identifier per media pipeline. |
60 int id_; | 61 int id_; |
61 | 62 |
62 DISALLOW_COPY_AND_ASSIGN(MediaChannelProxy); | 63 DISALLOW_COPY_AND_ASSIGN(MediaChannelProxy); |
63 }; | 64 }; |
64 | 65 |
65 } // namespace media | 66 } // namespace media |
66 } // namespace chromecast | 67 } // namespace chromecast |
67 | 68 |
68 #endif // CHROMECAST_RENDERER_MEDIA_MEDIA_CHANNEL_PROXY_H_ | 69 #endif // CHROMECAST_RENDERER_MEDIA_MEDIA_CHANNEL_PROXY_H_ |
OLD | NEW |