From 649e059f5fe93c0de53aaa48a74068703df46301 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 30 Jul 2018 20:27:21 +0000 Subject: Return unique_ptr from CXFA_FFNotify::OnCreate{Container,Content}LayoutItem() ... and then immediately release it, but it is a step in the right direction. Change-Id: Ib52972c6789d8f98a576d1c69f8019541c96ac51 Reviewed-on: https://pdfium-review.googlesource.com/39152 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- xfa/fxfa/cxfa_ffnotify.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/cxfa_ffnotify.h') diff --git a/xfa/fxfa/cxfa_ffnotify.h b/xfa/fxfa/cxfa_ffnotify.h index 6715f825ff..298a10123d 100644 --- a/xfa/fxfa/cxfa_ffnotify.h +++ b/xfa/fxfa/cxfa_ffnotify.h @@ -7,6 +7,8 @@ #ifndef XFA_FXFA_CXFA_FFNOTIFY_H_ #define XFA_FXFA_CXFA_FFNOTIFY_H_ +#include + #include "xfa/fxfa/cxfa_eventparam.h" #include "xfa/fxfa/parser/cxfa_document.h" @@ -39,8 +41,10 @@ class CXFA_FFNotify { void OnChildAdded(CXFA_Node* pSender); void OnChildRemoved(); - CXFA_ContainerLayoutItem* OnCreateContainerLayoutItem(CXFA_Node* pNode); - CXFA_ContentLayoutItem* OnCreateContentLayoutItem(CXFA_Node* pNode); + std::unique_ptr OnCreateContainerLayoutItem( + CXFA_Node* pNode); + std::unique_ptr OnCreateContentLayoutItem( + CXFA_Node* pNode); void OnLayoutItemAdded(CXFA_LayoutProcessor* pLayout, CXFA_LayoutItem* pSender, -- cgit v1.2.3