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

Issue 2466273003: Change IFWL_Widget to store a single delegate. (Closed)

Created:
4 years, 1 month ago by dsinclair
Modified:
4 years, 1 month ago
Reviewers:
Tom Sepez, Wei Li
CC:
pdfium-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Change IFWL_Widget to store a single delegate. Currently the IFWL_Widget will store a current and previous delegate. This was because the CXFA_FF* widgets would add |this| as a delegate which can not be cleaned up by the IFWL_Widget classes. This CL moves the CXFA_FF* code to actual Delegate classes which receive the previous delegate as a parameter. Then, the IFWL_Widget just holds a pointer to that delegate.

Patch Set 1 #

Patch Set 2 : Cleanup #

Total comments: 3

Patch Set 3 : Fix Mac #

Unified diffs Side-by-side diffs Delta from patch set Stats (+878 lines, -392 lines) Patch
M BUILD.gn View 1 chunk +18 lines, -0 lines 0 comments Download
M xfa/fwl/core/cfwl_widget.h View 1 chunk +2 lines, -2 lines 0 comments Download
M xfa/fwl/core/cfwl_widget.cpp View 1 chunk +4 lines, -4 lines 0 comments Download
M xfa/fwl/core/cfwl_widgetmgr.cpp View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M xfa/fwl/core/fwl_noteimp.cpp View 4 chunks +4 lines, -4 lines 0 comments Download
M xfa/fwl/core/ifwl_combobox.cpp View 7 chunks +8 lines, -9 lines 0 comments Download
M xfa/fwl/core/ifwl_combolist.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M xfa/fwl/core/ifwl_datetimecalendar.cpp View 1 chunk +1 line, -1 line 0 comments Download
M xfa/fwl/core/ifwl_datetimeedit.cpp View 1 chunk +1 line, -1 line 0 comments Download
M xfa/fwl/core/ifwl_datetimepicker.cpp View 4 chunks +4 lines, -4 lines 0 comments Download
M xfa/fwl/core/ifwl_form.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M xfa/fwl/core/ifwl_formproxy.cpp View 1 chunk +1 line, -1 line 0 comments Download
M xfa/fwl/core/ifwl_listbox.cpp View 1 chunk +1 line, -1 line 0 comments Download
M xfa/fwl/core/ifwl_widget.h View 3 chunks +8 lines, -8 lines 0 comments Download
M xfa/fwl/core/ifwl_widget.cpp View 4 chunks +2 lines, -13 lines 0 comments Download
A xfa/fxfa/app/cxfa_ffcheckbuttondelegate.h View 1 chunk +31 lines, -0 lines 0 comments Download
A xfa/fxfa/app/cxfa_ffcheckbuttondelegate.cpp View 1 1 chunk +66 lines, -0 lines 0 comments Download
A xfa/fxfa/app/cxfa_ffcomboboxdelegate.h View 1 chunk +31 lines, -0 lines 0 comments Download
A xfa/fxfa/app/cxfa_ffcomboboxdelegate.cpp View 1 1 chunk +58 lines, -0 lines 0 comments Download
A xfa/fxfa/app/cxfa_ffdatetimeeditdelegate.h View 1 chunk +28 lines, -0 lines 0 comments Download
A xfa/fxfa/app/cxfa_ffdatetimeeditdelegate.cpp View 1 1 chunk +31 lines, -0 lines 0 comments Download
A xfa/fxfa/app/cxfa_fffielddelegate.h View 1 chunk +35 lines, -0 lines 0 comments Download
A xfa/fxfa/app/cxfa_fffielddelegate.cpp View 1 chunk +64 lines, -0 lines 0 comments Download
A xfa/fxfa/app/cxfa_ffimageeditdelegate.h View 1 1 chunk +31 lines, -0 lines 0 comments Download
A xfa/fxfa/app/cxfa_ffimageeditdelegate.cpp View 1 1 chunk +28 lines, -0 lines 0 comments Download
A xfa/fxfa/app/cxfa_fflistboxdelegate.h View 1 chunk +31 lines, -0 lines 0 comments Download
A xfa/fxfa/app/cxfa_fflistboxdelegate.cpp View 1 1 chunk +40 lines, -0 lines 0 comments Download
A xfa/fxfa/app/cxfa_ffnumericeditdelegate.h View 1 chunk +28 lines, -0 lines 0 comments Download
A xfa/fxfa/app/cxfa_ffnumericeditdelegate.cpp View 1 chunk +30 lines, -0 lines 0 comments Download
A xfa/fxfa/app/cxfa_ffpushbuttondelegate.h View 1 chunk +31 lines, -0 lines 0 comments Download
A xfa/fxfa/app/cxfa_ffpushbuttondelegate.cpp View 1 1 chunk +68 lines, -0 lines 0 comments Download
A xfa/fxfa/app/cxfa_fftexteditdelegate.h View 1 chunk +31 lines, -0 lines 0 comments Download
A xfa/fxfa/app/cxfa_fftexteditdelegate.cpp View 1 chunk +62 lines, -0 lines 0 comments Download
M xfa/fxfa/app/xfa_ffbarcode.cpp View 2 chunks +4 lines, -2 lines 0 comments Download
M xfa/fxfa/app/xfa_ffcheckbutton.h View 2 chunks +0 lines, -5 lines 0 comments Download
M xfa/fxfa/app/xfa_ffcheckbutton.cpp View 4 chunks +5 lines, -46 lines 0 comments Download
M xfa/fxfa/app/xfa_ffchoicelist.h View 4 chunks +0 lines, -13 lines 0 comments Download
M xfa/fxfa/app/xfa_ffchoicelist.cpp View 6 chunks +9 lines, -65 lines 0 comments Download
M xfa/fxfa/app/xfa_fffield.h View 2 chunks +5 lines, -10 lines 0 comments Download
M xfa/fxfa/app/xfa_fffield.cpp View 33 chunks +41 lines, -43 lines 0 comments Download
M xfa/fxfa/app/xfa_ffimageedit.h View 1 chunk +0 lines, -6 lines 0 comments Download
M xfa/fxfa/app/xfa_ffimageedit.cpp View 4 chunks +6 lines, -16 lines 0 comments Download
M xfa/fxfa/app/xfa_ffpushbutton.h View 2 chunks +2 lines, -6 lines 0 comments Download
M xfa/fxfa/app/xfa_ffpushbutton.cpp View 4 chunks +7 lines, -48 lines 0 comments Download
M xfa/fxfa/app/xfa_fftextedit.h View 4 chunks +0 lines, -8 lines 0 comments Download
M xfa/fxfa/app/xfa_fftextedit.cpp View 9 chunks +15 lines, -68 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 11 (5 generated)
dsinclair
PTAL.
4 years, 1 month ago (2016-11-01 20:40:53 UTC) #4
Tom Sepez
https://codereview.chromium.org/2466273003/diff/20001/xfa/fwl/core/ifwl_widget.h File xfa/fwl/core/ifwl_widget.h (right): https://codereview.chromium.org/2466273003/diff/20001/xfa/fwl/core/ifwl_widget.h#newcode121 xfa/fwl/core/ifwl_widget.h:121: return pdfium::WrapUnique<IFWL_WidgetDelegate>(m_pDelegate.release()); nit: maybe return std::move(m_pDelegate); https://codereview.chromium.org/2466273003/diff/20001/xfa/fxfa/app/cxfa_ffcheckbuttondelegate.h File xfa/fxfa/app/cxfa_ffcheckbuttondelegate.h ...
4 years, 1 month ago (2016-11-01 20:54:05 UTC) #5
dsinclair
https://codereview.chromium.org/2466273003/diff/20001/xfa/fxfa/app/cxfa_ffcheckbuttondelegate.h File xfa/fxfa/app/cxfa_ffcheckbuttondelegate.h (right): https://codereview.chromium.org/2466273003/diff/20001/xfa/fxfa/app/cxfa_ffcheckbuttondelegate.h#newcode1 xfa/fxfa/app/cxfa_ffcheckbuttondelegate.h:1: // Copyright 2016 PDFium Authors. All rights reserved. On ...
4 years, 1 month ago (2016-11-01 20:58:10 UTC) #8
Tom Sepez
> > Making which class never own the delegate, the IFWL_Widget? In that case, you'd ...
4 years, 1 month ago (2016-11-01 21:03:28 UTC) #9
dsinclair
On 2016/11/01 21:03:28, Tom Sepez wrote: > > > > Making which class never own ...
4 years, 1 month ago (2016-11-01 21:07:40 UTC) #10
Tom Sepez
4 years, 1 month ago (2016-11-01 21:15:04 UTC) #11
Message was sent while issue was closed.
> K, I'll close this and go at it the other route of moving m_pDelegate
ownership
> up to the calling classes. Then this isn't needed as the CXFA_FF* widgets can
> continue to pass |this| as the delegate.

Thanks.  Let me know how it goes; I'm guessing ok as |this| usually has all the
state to complete the delegated request anyways ...

Powered by Google App Engine
This is Rietveld 408576698