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

Issue 2306663002: Add observer for BAAnnots from Javascript (Closed)

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

Description

Add observer for BAAnnots from Javascript This Cl moves the observer code from the CPDFSDK_Widget up into the CPDFSDK_Annot base class and then adds a second observer for CPDFSDK_BAAnnot objects. This allows us to attach an observer to the Annot javascript class which will update its internal pointer to the BAAnnot if the BAAnnot is destroyed by the CPDFSDK_PageView being destroyed. BUG=chromium:642307 Committed: https://pdfium.googlesource.com/pdfium/+/ce04a458828b45035dab46c13e14a1f0ae67a2b7

Patch Set 1 #

Total comments: 6

Patch Set 2 : Single observer #

Patch Set 3 : cleanup #

Total comments: 8

Patch Set 4 : Rebase to master #

Patch Set 5 : Review updates #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -58 lines) Patch
M fpdfsdk/cpdfsdk_annot.cpp View 1 2 chunks +31 lines, -1 line 0 comments Download
M fpdfsdk/cpdfsdk_widget.cpp View 1 3 chunks +1 line, -31 lines 0 comments Download
M fpdfsdk/include/cpdfsdk_annot.h View 1 2 chunks +14 lines, -0 lines 0 comments Download
M fpdfsdk/include/cpdfsdk_widget.h View 1 3 chunks +0 lines, -15 lines 0 comments Download
M fpdfsdk/javascript/Annot.h View 1 2 3 4 2 chunks +4 lines, -1 line 2 comments Download
M fpdfsdk/javascript/Annot.cpp View 1 2 3 4 5 chunks +28 lines, -7 lines 0 comments Download
M fpdfsdk/javascript/Field.cpp View 1 2 3 4 1 chunk +4 lines, -3 lines 0 comments Download

Messages

Total messages: 37 (15 generated)
dsinclair
PTAL.
4 years, 3 months ago (2016-09-01 16:36:14 UTC) #2
Tom Sepez
On 2016/09/01 16:36:14, dsinclair wrote: > PTAL. Can we get by with just making a ...
4 years, 3 months ago (2016-09-01 17:15:18 UTC) #7
dsinclair
On 2016/09/01 17:15:18, Tom Sepez wrote: > On 2016/09/01 16:36:14, dsinclair wrote: > > PTAL. ...
4 years, 3 months ago (2016-09-01 17:18:29 UTC) #8
Tom Sepez
> I wasn't able to figure out if there was correct magic to coerce the ...
4 years, 3 months ago (2016-09-01 17:23:17 UTC) #9
dsinclair
On 2016/09/01 17:23:17, Tom Sepez wrote: > > I wasn't able to figure out if ...
4 years, 3 months ago (2016-09-01 17:26:09 UTC) #10
Tom Sepez
On 2016/09/01 17:26:09, dsinclair wrote: > On 2016/09/01 17:23:17, Tom Sepez wrote: > > > ...
4 years, 3 months ago (2016-09-01 17:44:40 UTC) #11
Wei Li
On 2016/09/01 17:26:09, dsinclair wrote: > On 2016/09/01 17:23:17, Tom Sepez wrote: > > > ...
4 years, 3 months ago (2016-09-01 17:53:40 UTC) #12
dsinclair
On 2016/09/01 17:53:40, Wei Li wrote: > Can we just release the widget/BAAnnot by calling ...
4 years, 3 months ago (2016-09-01 17:58:04 UTC) #13
dsinclair
On 2016/09/01 17:58:04, dsinclair wrote: > On 2016/09/01 17:53:40, Wei Li wrote: > > Can ...
4 years, 3 months ago (2016-09-01 17:59:20 UTC) #14
Tom Sepez
https://codereview.chromium.org/2306663002/diff/1/fpdfsdk/javascript/Annot.h File fpdfsdk/javascript/Annot.h (right): https://codereview.chromium.org/2306663002/diff/1/fpdfsdk/javascript/Annot.h#newcode28 fpdfsdk/javascript/Annot.h:28: std::unique_ptr<CPDFSDK_BAAnnot::Observer> m_pObserver; This can't be a widget observer?
4 years, 3 months ago (2016-09-01 18:03:30 UTC) #15
Tom Sepez
https://codereview.chromium.org/2306663002/diff/1/fpdfsdk/javascript/Annot.cpp File fpdfsdk/javascript/Annot.cpp (right): https://codereview.chromium.org/2306663002/diff/1/fpdfsdk/javascript/Annot.cpp#newcode97 fpdfsdk/javascript/Annot.cpp:97: m_BAAnnot = baannot; m_BAAnnot can't be a widget?
4 years, 3 months ago (2016-09-01 18:04:24 UTC) #16
dsinclair
https://codereview.chromium.org/2306663002/diff/1/fpdfsdk/javascript/Annot.cpp File fpdfsdk/javascript/Annot.cpp (right): https://codereview.chromium.org/2306663002/diff/1/fpdfsdk/javascript/Annot.cpp#newcode97 fpdfsdk/javascript/Annot.cpp:97: m_BAAnnot = baannot; On 2016/09/01 18:04:24, Tom Sepez wrote: ...
4 years, 3 months ago (2016-09-01 18:11:59 UTC) #17
Tom Sepez
https://codereview.chromium.org/2306663002/diff/1/fpdfsdk/javascript/Annot.cpp File fpdfsdk/javascript/Annot.cpp (right): https://codereview.chromium.org/2306663002/diff/1/fpdfsdk/javascript/Annot.cpp#newcode97 fpdfsdk/javascript/Annot.cpp:97: m_BAAnnot = baannot; On 2016/09/01 18:04:24, Tom Sepez wrote: ...
4 years, 3 months ago (2016-09-01 18:12:07 UTC) #18
dsinclair
PTAL.
4 years, 3 months ago (2016-09-01 18:29:07 UTC) #21
Tom Sepez
Cleaner. CL description needs update. https://codereview.chromium.org/2306663002/diff/40001/fpdfsdk/javascript/Annot.cpp File fpdfsdk/javascript/Annot.cpp (right): https://codereview.chromium.org/2306663002/diff/40001/fpdfsdk/javascript/Annot.cpp#newcode17 fpdfsdk/javascript/Annot.cpp:17: return annot ? static_cast<CPDFSDK_BAAnnot*>(annot) ...
4 years, 3 months ago (2016-09-01 20:06:23 UTC) #24
Lei Zhang
https://codereview.chromium.org/2306663002/diff/40001/fpdfsdk/javascript/Annot.h File fpdfsdk/javascript/Annot.h (right): https://codereview.chromium.org/2306663002/diff/40001/fpdfsdk/javascript/Annot.h#newcode27 fpdfsdk/javascript/Annot.h:27: CPDFSDK_Annot* m_Annot = nullptr; nit: m_pAnnot https://codereview.chromium.org/2306663002/diff/40001/fpdfsdk/javascript/Annot.h#newcode27 fpdfsdk/javascript/Annot.h:27: CPDFSDK_Annot* ...
4 years, 3 months ago (2016-09-02 01:21:25 UTC) #25
dsinclair
https://codereview.chromium.org/2306663002/diff/40001/fpdfsdk/javascript/Annot.cpp File fpdfsdk/javascript/Annot.cpp (right): https://codereview.chromium.org/2306663002/diff/40001/fpdfsdk/javascript/Annot.cpp#newcode17 fpdfsdk/javascript/Annot.cpp:17: return annot ? static_cast<CPDFSDK_BAAnnot*>(annot) : nullptr; On 2016/09/01 20:06:23, ...
4 years, 3 months ago (2016-09-06 15:44:50 UTC) #26
Tom Sepez
https://codereview.chromium.org/2306663002/diff/80001/fpdfsdk/javascript/Annot.h File fpdfsdk/javascript/Annot.h (right): https://codereview.chromium.org/2306663002/diff/80001/fpdfsdk/javascript/Annot.h#newcode28 fpdfsdk/javascript/Annot.h:28: std::unique_ptr<CPDFSDK_Annot::Observer> m_pObserver; Maybe it should inherit from this rather ...
4 years, 3 months ago (2016-09-06 20:27:05 UTC) #31
dsinclair
https://codereview.chromium.org/2306663002/diff/80001/fpdfsdk/javascript/Annot.h File fpdfsdk/javascript/Annot.h (right): https://codereview.chromium.org/2306663002/diff/80001/fpdfsdk/javascript/Annot.h#newcode28 fpdfsdk/javascript/Annot.h:28: std::unique_ptr<CPDFSDK_Annot::Observer> m_pObserver; On 2016/09/06 20:27:05, Tom Sepez wrote: > ...
4 years, 3 months ago (2016-09-06 20:32:20 UTC) #32
Tom Sepez
> We would need to change Observer in that case, currently it accepts the thing ...
4 years, 3 months ago (2016-09-06 22:12:37 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2306663002/80001
4 years, 3 months ago (2016-09-07 12:46:42 UTC) #35
commit-bot: I haz the power
4 years, 3 months ago (2016-09-07 12:47:00 UTC) #37
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://pdfium.googlesource.com/pdfium/+/ce04a458828b45035dab46c13e14a1f0ae67...

Powered by Google App Engine
This is Rietveld 408576698