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

Side by Side Diff: content/renderer/pepper/pepper_video_destination_host.cc

Issue 281803003: Add PPAPI_BEGIN_MESSAGE_MAP and PPAPI_END_MESSAGE_MAP to be used when dispatching IPCs using PPAPI_… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/time.h" 7 #include "base/time/time.h"
8 #include "content/public/renderer/renderer_ppapi_host.h" 8 #include "content/public/renderer/renderer_ppapi_host.h"
9 #include "content/renderer/pepper/ppb_image_data_impl.h" 9 #include "content/renderer/pepper/ppb_image_data_impl.h"
10 #include "ppapi/c/pp_errors.h" 10 #include "ppapi/c/pp_errors.h"
(...skipping 14 matching lines...) Expand all
25 PP_Resource resource) 25 PP_Resource resource)
26 : ResourceHost(host->GetPpapiHost(), instance, resource), 26 : ResourceHost(host->GetPpapiHost(), instance, resource),
27 renderer_ppapi_host_(host), 27 renderer_ppapi_host_(host),
28 weak_factory_(this) {} 28 weak_factory_(this) {}
29 29
30 PepperVideoDestinationHost::~PepperVideoDestinationHost() {} 30 PepperVideoDestinationHost::~PepperVideoDestinationHost() {}
31 31
32 int32_t PepperVideoDestinationHost::OnResourceMessageReceived( 32 int32_t PepperVideoDestinationHost::OnResourceMessageReceived(
33 const IPC::Message& msg, 33 const IPC::Message& msg,
34 HostMessageContext* context) { 34 HostMessageContext* context) {
35 IPC_BEGIN_MESSAGE_MAP(PepperVideoDestinationHost, msg) 35 PPAPI_BEGIN_MESSAGE_MAP(PepperVideoDestinationHost, msg)
36 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_VideoDestination_Open, 36 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_VideoDestination_Open,
37 OnHostMsgOpen) 37 OnHostMsgOpen)
38 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_VideoDestination_PutFrame, 38 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_VideoDestination_PutFrame,
39 OnHostMsgPutFrame) 39 OnHostMsgPutFrame)
40 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_VideoDestination_Close, 40 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_VideoDestination_Close,
41 OnHostMsgClose) 41 OnHostMsgClose)
42 IPC_END_MESSAGE_MAP() 42 PPAPI_END_MESSAGE_MAP()
43 return PP_ERROR_FAILED; 43 return PP_ERROR_FAILED;
44 } 44 }
45 45
46 int32_t PepperVideoDestinationHost::OnHostMsgOpen( 46 int32_t PepperVideoDestinationHost::OnHostMsgOpen(
47 HostMessageContext* context, 47 HostMessageContext* context,
48 const std::string& stream_url) { 48 const std::string& stream_url) {
49 GURL gurl(stream_url); 49 GURL gurl(stream_url);
50 if (!gurl.is_valid()) 50 if (!gurl.is_valid())
51 return PP_ERROR_BADARGUMENT; 51 return PP_ERROR_BADARGUMENT;
52 52
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 return PP_OK; 92 return PP_OK;
93 } 93 }
94 94
95 int32_t PepperVideoDestinationHost::OnHostMsgClose( 95 int32_t PepperVideoDestinationHost::OnHostMsgClose(
96 HostMessageContext* context) { 96 HostMessageContext* context) {
97 frame_writer_.reset(NULL); 97 frame_writer_.reset(NULL);
98 return PP_OK; 98 return PP_OK;
99 } 99 }
100 100
101 } // namespace content 101 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698