OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_video_destination_host.h" | 5 #include "content/renderer/pepper/pepper_video_destination_host.h" |
6 | 6 |
7 #include "base/time.h" | 7 #include "base/time.h" |
8 #include "content/public/renderer/renderer_ppapi_host.h" | 8 #include "content/public/renderer/renderer_ppapi_host.h" |
9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
10 #include "ppapi/host/dispatch_host_message.h" | 10 #include "ppapi/host/dispatch_host_message.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 } | 30 } |
31 | 31 |
32 PepperVideoDestinationHost::~PepperVideoDestinationHost() { | 32 PepperVideoDestinationHost::~PepperVideoDestinationHost() { |
33 } | 33 } |
34 | 34 |
35 int32_t PepperVideoDestinationHost::OnResourceMessageReceived( | 35 int32_t PepperVideoDestinationHost::OnResourceMessageReceived( |
36 const IPC::Message& msg, | 36 const IPC::Message& msg, |
37 HostMessageContext* context) { | 37 HostMessageContext* context) { |
38 IPC_BEGIN_MESSAGE_MAP(PepperVideoDestinationHost, msg) | 38 IPC_BEGIN_MESSAGE_MAP(PepperVideoDestinationHost, msg) |
39 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_VideoDestination_Open, | 39 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_VideoDestination_Open, |
40 OnHostMsgOpen) | 40 OnHostMsgOpen) |
41 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_VideoDestination_PutFrame, | 41 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_VideoDestination_PutFrame, |
42 OnHostMsgPutFrame) | 42 OnHostMsgPutFrame) |
43 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_VideoDestination_Close, | 43 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_VideoDestination_Close, |
44 OnHostMsgClose) | 44 OnHostMsgClose) |
45 IPC_END_MESSAGE_MAP() | 45 IPC_END_MESSAGE_MAP() |
46 return PP_ERROR_FAILED; | 46 return PP_ERROR_FAILED; |
47 } | 47 } |
48 | 48 |
49 int32_t PepperVideoDestinationHost::OnHostMsgOpen( | 49 int32_t PepperVideoDestinationHost::OnHostMsgOpen( |
50 HostMessageContext* context, | 50 HostMessageContext* context, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 return PP_OK; | 98 return PP_OK; |
99 } | 99 } |
100 | 100 |
101 int32_t PepperVideoDestinationHost::OnHostMsgClose( | 101 int32_t PepperVideoDestinationHost::OnHostMsgClose( |
102 HostMessageContext* context) { | 102 HostMessageContext* context) { |
103 frame_writer_.reset(NULL); | 103 frame_writer_.reset(NULL); |
104 return PP_OK; | 104 return PP_OK; |
105 } | 105 } |
106 | 106 |
107 } // namespace content | 107 } // namespace content |
OLD | NEW |