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 "content/renderer/pepper/pepper_media_stream_track_host_base.h" | 5 #include "content/renderer/pepper/pepper_media_stream_track_host_base.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/public/renderer/render_thread.h" | 8 #include "content/public/renderer/render_thread.h" |
9 #include "content/public/renderer/renderer_ppapi_host.h" | 9 #include "content/public/renderer/renderer_ppapi_host.h" |
10 #include "ppapi/c/pp_errors.h" | 10 #include "ppapi/c/pp_errors.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 void PepperMediaStreamTrackHostBase::SendEnqueueBuffersMessageToPlugin( | 84 void PepperMediaStreamTrackHostBase::SendEnqueueBuffersMessageToPlugin( |
85 const std::vector<int32_t>& indices) { | 85 const std::vector<int32_t>& indices) { |
86 DCHECK_GE(indices.size(), 0U); | 86 DCHECK_GE(indices.size(), 0U); |
87 host()->SendUnsolicitedReply(pp_resource(), | 87 host()->SendUnsolicitedReply(pp_resource(), |
88 PpapiPluginMsg_MediaStreamTrack_EnqueueBuffers(indices)); | 88 PpapiPluginMsg_MediaStreamTrack_EnqueueBuffers(indices)); |
89 } | 89 } |
90 | 90 |
91 int32_t PepperMediaStreamTrackHostBase::OnResourceMessageReceived( | 91 int32_t PepperMediaStreamTrackHostBase::OnResourceMessageReceived( |
92 const IPC::Message& msg, | 92 const IPC::Message& msg, |
93 HostMessageContext* context) { | 93 HostMessageContext* context) { |
94 IPC_BEGIN_MESSAGE_MAP(PepperMediaStreamTrackHostBase, msg) | 94 PPAPI_BEGIN_MESSAGE_MAP(PepperMediaStreamTrackHostBase, msg) |
95 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_MediaStreamTrack_EnqueueBuffer, | 95 PPAPI_DISPATCH_HOST_RESOURCE_CALL( |
96 OnHostMsgEnqueueBuffer) | 96 PpapiHostMsg_MediaStreamTrack_EnqueueBuffer, OnHostMsgEnqueueBuffer) |
97 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_MediaStreamTrack_Close, | 97 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_MediaStreamTrack_Close, |
98 OnHostMsgClose) | 98 OnHostMsgClose) |
99 IPC_END_MESSAGE_MAP() | 99 PPAPI_END_MESSAGE_MAP() |
100 return ppapi::host::ResourceHost::OnResourceMessageReceived(msg, context); | 100 return ppapi::host::ResourceHost::OnResourceMessageReceived(msg, context); |
101 } | 101 } |
102 | 102 |
103 int32_t PepperMediaStreamTrackHostBase::OnHostMsgEnqueueBuffer( | 103 int32_t PepperMediaStreamTrackHostBase::OnHostMsgEnqueueBuffer( |
104 HostMessageContext* context, | 104 HostMessageContext* context, |
105 int32_t index) { | 105 int32_t index) { |
106 buffer_manager_.EnqueueBuffer(index); | 106 buffer_manager_.EnqueueBuffer(index); |
107 return PP_OK; | 107 return PP_OK; |
108 } | 108 } |
109 | 109 |
110 int32_t PepperMediaStreamTrackHostBase::OnHostMsgClose( | 110 int32_t PepperMediaStreamTrackHostBase::OnHostMsgClose( |
111 HostMessageContext* context) { | 111 HostMessageContext* context) { |
112 OnClose(); | 112 OnClose(); |
113 return PP_OK; | 113 return PP_OK; |
114 } | 114 } |
115 | 115 |
116 } // namespace content | 116 } // namespace content |
OLD | NEW |