diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-10-26 19:42:40 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-26 19:42:40 +0000 |
commit | 7df950ac2ef484880fe3cbfb9961bed34fee191d (patch) | |
tree | 922958659a46f1344c61cf16a1f7b92b3541ac1d /fpdfsdk/pwl/cpwl_wnd.h | |
parent | 385bf2e0481230b1f5e50a2627063383bd297451 (diff) | |
download | pdfium-7df950ac2ef484880fe3cbfb9961bed34fee191d.tar.xz |
Stop transfering ownership of |this| as CPWL_Wnd::Create() side-effect
Instead, make it an explicit method called on the parent outside
of create. Rename Create() to Realize() to be sure to catch all
usages, and add the new required call.
Attachment to the parent now takes place a little earlier on in
the life-cycle as a result but should be ok.
Precursor to converting to smart pointers.
Change-Id: I45c459fcd28b5d03c428ce5809d0432506cf4ec6
Reviewed-on: https://pdfium-review.googlesource.com/c/44690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/pwl/cpwl_wnd.h')
-rw-r--r-- | fpdfsdk/pwl/cpwl_wnd.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fpdfsdk/pwl/cpwl_wnd.h b/fpdfsdk/pwl/cpwl_wnd.h index 921693f148..8d7eebc5e9 100644 --- a/fpdfsdk/pwl/cpwl_wnd.h +++ b/fpdfsdk/pwl/cpwl_wnd.h @@ -177,15 +177,16 @@ class CPWL_Wnd : public CPWL_TimerHandler, public Observable<CPWL_Wnd> { virtual CFX_FloatRect GetFocusRect() const; virtual CFX_FloatRect GetClientRect() const; - void InvalidateFocusHandler(FocusHandlerIface* handler); - void InvalidateProvider(ProviderIface* provider); - void Create(const CreateParams& cp); + void AddChild(CPWL_Wnd* pWnd); + void RemoveChild(CPWL_Wnd* pWnd); + void Realize(const CreateParams& cp); void Destroy(); bool Move(const CFX_FloatRect& rcNew, bool bReset, bool bRefresh); + void InvalidateFocusHandler(FocusHandlerIface* handler); + void InvalidateProvider(ProviderIface* provider); void SetCapture(); void ReleaseCapture(); - void DrawAppearance(CFX_RenderDevice* pDevice, const CFX_Matrix& mtUser2Device); @@ -296,9 +297,6 @@ class CPWL_Wnd : public CPWL_TimerHandler, public Observable<CPWL_Wnd> { CFX_FloatRect PWLtoWnd(const CFX_FloatRect& rect) const; - void AddChild(CPWL_Wnd* pWnd); - void RemoveChild(CPWL_Wnd* pWnd); - void CreateScrollBar(const CreateParams& cp); void CreateVScrollBar(const CreateParams& cp); |