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

Issue 2209153002: Use virtual function to retrieve interface pointer (Closed)

Created:
4 years, 4 months ago by Wei Li
Modified:
4 years, 4 months ago
Reviewers:
Lei Zhang, dsinclair
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Use virtual function to retrieve interface pointer Use virtual function to return the actual interface type instead of the base interface type to avoid a lot of casts. Also tidy up CFWL_Widget by encapsulating variables, and use smart pointers for class owned member variables. Committed: https://pdfium.googlesource.com/pdfium/+/5d8e5aa882fe8d37d32b71137f039165581ddb82

Patch Set 1 #

Patch Set 2 : complete changes #

Total comments: 8

Patch Set 3 : address comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+292 lines, -257 lines) Patch
M xfa/fwl/lightwidget/cfwl_barcode.h View 1 2 chunks +5 lines, -1 line 0 comments Download
M xfa/fwl/lightwidget/cfwl_barcode.cpp View 1 2 3 chunks +12 lines, -7 lines 0 comments Download
M xfa/fwl/lightwidget/cfwl_checkbox.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M xfa/fwl/lightwidget/cfwl_checkbox.cpp View 1 3 chunks +11 lines, -3 lines 0 comments Download
M xfa/fwl/lightwidget/cfwl_combobox.h View 1 chunk +3 lines, -0 lines 0 comments Download
M xfa/fwl/lightwidget/cfwl_combobox.cpp View 1 2 6 chunks +52 lines, -94 lines 0 comments Download
M xfa/fwl/lightwidget/cfwl_datetimepicker.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M xfa/fwl/lightwidget/cfwl_datetimepicker.cpp View 1 4 chunks +31 lines, -27 lines 0 comments Download
M xfa/fwl/lightwidget/cfwl_edit.h View 2 chunks +4 lines, -0 lines 0 comments Download
M xfa/fwl/lightwidget/cfwl_edit.cpp View 2 chunks +66 lines, -62 lines 0 comments Download
M xfa/fwl/lightwidget/cfwl_listbox.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M xfa/fwl/lightwidget/cfwl_listbox.cpp View 1 6 chunks +26 lines, -18 lines 0 comments Download
M xfa/fwl/lightwidget/cfwl_picturebox.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M xfa/fwl/lightwidget/cfwl_picturebox.cpp View 1 6 chunks +13 lines, -5 lines 0 comments Download
M xfa/fwl/lightwidget/cfwl_pushbutton.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M xfa/fwl/lightwidget/cfwl_pushbutton.cpp View 1 2 chunks +9 lines, -1 line 0 comments Download
M xfa/fwl/lightwidget/cfwl_widget.h View 1 2 3 chunks +10 lines, -5 lines 0 comments Download
M xfa/fwl/lightwidget/cfwl_widget.cpp View 1 2 6 chunks +14 lines, -13 lines 0 comments Download
M xfa/fxfa/app/xfa_ffcheckbutton.cpp View 1 chunk +1 line, -1 line 0 comments Download
M xfa/fxfa/app/xfa_fffield.cpp View 16 chunks +16 lines, -16 lines 0 comments Download
M xfa/fxfa/app/xfa_ffimageedit.cpp View 1 chunk +1 line, -1 line 0 comments Download
M xfa/fxfa/app/xfa_fftextedit.cpp View 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 20 (14 generated)
Wei Li
pls review, thanks
4 years, 4 months ago (2016-08-04 23:41:41 UTC) #8
Lei Zhang
lgtm https://codereview.chromium.org/2209153002/diff/20001/xfa/fwl/lightwidget/cfwl_barcode.cpp File xfa/fwl/lightwidget/cfwl_barcode.cpp (right): https://codereview.chromium.org/2209153002/diff/20001/xfa/fwl/lightwidget/cfwl_barcode.cpp#newcode45 xfa/fwl/lightwidget/cfwl_barcode.cpp:45: if (!GetWidget()) auto* pWidget = GetWidget(); if (pWidget) ...
4 years, 4 months ago (2016-08-05 17:34:19 UTC) #9
Wei Li
thanks https://codereview.chromium.org/2209153002/diff/20001/xfa/fwl/lightwidget/cfwl_barcode.cpp File xfa/fwl/lightwidget/cfwl_barcode.cpp (right): https://codereview.chromium.org/2209153002/diff/20001/xfa/fwl/lightwidget/cfwl_barcode.cpp#newcode45 xfa/fwl/lightwidget/cfwl_barcode.cpp:45: if (!GetWidget()) On 2016/08/05 17:34:18, Lei Zhang wrote: ...
4 years, 4 months ago (2016-08-08 23:55:37 UTC) #11
Lei Zhang
++lgtm
4 years, 4 months ago (2016-08-09 00:03:44 UTC) #14
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/2209153002/80001
4 years, 4 months ago (2016-08-09 00:30:22 UTC) #18
commit-bot: I haz the power
4 years, 4 months ago (2016-08-09 00:30:42 UTC) #20
Message was sent while issue was closed.
Committed patchset #3 (id:80001) as
https://pdfium.googlesource.com/pdfium/+/5d8e5aa882fe8d37d32b71137f039165581d...

Powered by Google App Engine
This is Rietveld 408576698