Index: content/renderer/pepper/pepper_video_source_host.cc |
diff --git a/content/renderer/pepper/pepper_video_source_host.cc b/content/renderer/pepper/pepper_video_source_host.cc |
index 0c4b1c36a80396747e1dd0af22ae37aac6f64a3e..0b70f54d025fc892e526334208462938dda968a8 100644 |
--- a/content/renderer/pepper/pepper_video_source_host.cc |
+++ b/content/renderer/pepper/pepper_video_source_host.cc |
@@ -29,11 +29,9 @@ namespace content { |
PepperVideoSourceHost::FrameReceiver::FrameReceiver( |
const base::WeakPtr<PepperVideoSourceHost>& host) |
: host_(host), |
- main_message_loop_proxy_(base::MessageLoopProxy::current()) { |
-} |
+ main_message_loop_proxy_(base::MessageLoopProxy::current()) {} |
-PepperVideoSourceHost::FrameReceiver::~FrameReceiver() { |
-} |
+PepperVideoSourceHost::FrameReceiver::~FrameReceiver() {} |
bool PepperVideoSourceHost::FrameReceiver::GotFrame( |
cricket::VideoFrame* frame) { |
@@ -59,10 +57,9 @@ void PepperVideoSourceHost::FrameReceiver::OnGotFrame( |
} |
} |
-PepperVideoSourceHost::PepperVideoSourceHost( |
- RendererPpapiHost* host, |
- PP_Instance instance, |
- PP_Resource resource) |
+PepperVideoSourceHost::PepperVideoSourceHost(RendererPpapiHost* host, |
+ PP_Instance instance, |
+ PP_Resource resource) |
: ResourceHost(host->GetPpapiHost(), instance, resource), |
renderer_ppapi_host_(host), |
source_handler_(new VideoSourceHandler(NULL)), |
@@ -71,20 +68,18 @@ PepperVideoSourceHost::PepperVideoSourceHost( |
frame_receiver_ = new FrameReceiver(weak_factory_.GetWeakPtr()); |
} |
-PepperVideoSourceHost::~PepperVideoSourceHost() { |
- Close(); |
-} |
+PepperVideoSourceHost::~PepperVideoSourceHost() { Close(); } |
int32_t PepperVideoSourceHost::OnResourceMessageReceived( |
const IPC::Message& msg, |
HostMessageContext* context) { |
IPC_BEGIN_MESSAGE_MAP(PepperVideoSourceHost, msg) |
- PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_VideoSource_Open, |
- OnHostMsgOpen) |
- PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_VideoSource_GetFrame, |
- OnHostMsgGetFrame) |
- PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_VideoSource_Close, |
- OnHostMsgClose) |
+ PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_VideoSource_Open, |
+ OnHostMsgOpen) |
+ PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_VideoSource_GetFrame, |
+ OnHostMsgGetFrame) |
+ PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_VideoSource_Close, |
+ OnHostMsgClose) |
IPC_END_MESSAGE_MAP() |
return PP_ERROR_FAILED; |
} |
@@ -147,7 +142,9 @@ void PepperVideoSourceHost::SendGetFrameReply() { |
PP_IMAGEDATAFORMAT_BGRA_PREMUL, |
PP_MakeSize(width, height), |
false /* init_to_zero */, |
- &image_desc, &image_handle, &byte_count)); |
+ &image_desc, |
+ &image_handle, |
+ &byte_count)); |
if (!resource.get()) { |
SendGetFrameErrorReply(PP_ERROR_FAILED); |
return; |
@@ -180,10 +177,8 @@ void PepperVideoSourceHost::SendGetFrameReply() { |
} |
size_t bitmap_size = bitmap->getSize(); |
- frame->ConvertToRgbBuffer(cricket::FOURCC_BGRA, |
- bitmap_pixels, |
- bitmap_size, |
- bitmap->rowBytes()); |
+ frame->ConvertToRgbBuffer( |
+ cricket::FOURCC_BGRA, bitmap_pixels, bitmap_size, bitmap->rowBytes()); |
ppapi::HostResource host_resource; |
host_resource.SetHostResource(pp_instance(), resource.get()); |
@@ -200,9 +195,8 @@ void PepperVideoSourceHost::SendGetFrameReply() { |
reply_context_.params.AppendHandle(serialized_handle); |
host()->SendReply(reply_context_, |
- PpapiPluginMsg_VideoSource_GetFrameReply(host_resource, |
- image_desc, |
- timestamp)); |
+ PpapiPluginMsg_VideoSource_GetFrameReply( |
+ host_resource, image_desc, timestamp)); |
reply_context_ = ppapi::host::ReplyMessageContext(); |
@@ -214,9 +208,8 @@ void PepperVideoSourceHost::SendGetFrameErrorReply(int32_t error) { |
reply_context_.params.set_result(error); |
host()->SendReply( |
reply_context_, |
- PpapiPluginMsg_VideoSource_GetFrameReply(ppapi::HostResource(), |
- PP_ImageDataDesc(), |
- 0.0 /* timestamp */)); |
+ PpapiPluginMsg_VideoSource_GetFrameReply( |
+ ppapi::HostResource(), PP_ImageDataDesc(), 0.0 /* timestamp */)); |
reply_context_ = ppapi::host::ReplyMessageContext(); |
} |