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

Unified Diff: xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp

Issue 1453473002: FWL refcounts never incremented (part 2). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Rebased Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/include/fwl/core/fwl_widget.h ('k') | xfa/src/fwl/src/basewidget/fwl_caretimp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp
diff --git a/xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp b/xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp
index 37cc945947e12702478ef680a11e1520194658e6..02cd6a7b549ac13e648bfbaa8d84823aa1c171c1 100644
--- a/xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp
@@ -10,26 +10,23 @@
#include "../core/include/fwl_widgetimp.h"
#include "include/fwl_editimp.h"
#include "include/fwl_barcodeimp.h"
-IFWL_Barcode::IFWL_Barcode() {
-}
-FWL_ERR IFWL_Barcode::Initialize(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter) {
- CFWL_BarcodeImp* pBarcodeImpl = new CFWL_BarcodeImp(properties, pOuter);
- SetImpl(pBarcodeImpl);
- pBarcodeImpl->SetInterface(this);
- return pBarcodeImpl->Initialize();
-}
+
+// static
+IFWL_Barcode* IFWL_Barcode::Create(const CFWL_WidgetImpProperties& properties) {
+ IFWL_Barcode* pBarcode = new IFWL_Barcode;
+ CFWL_BarcodeImp* pBarcodeImpl = new CFWL_BarcodeImp(properties, nullptr);
+ pBarcode->SetImpl(pBarcodeImpl);
+ pBarcodeImpl->SetInterface(pBarcode);
+ return pBarcode;
+}
+IFWL_Barcode::IFWL_Barcode() {}
void IFWL_Barcode::SetType(BC_TYPE type) {
static_cast<CFWL_BarcodeImp*>(GetImpl())->SetType(type);
}
FX_BOOL IFWL_Barcode::IsProtectedType() {
return static_cast<CFWL_BarcodeImp*>(GetImpl())->IsProtectedType();
}
-CFWL_BarcodeImp::CFWL_BarcodeImp(IFWL_Widget* pOuter)
- : CFWL_EditImp(pOuter),
- m_pBarcodeEngine(NULL),
- m_dwStatus(0),
- m_type(BC_UNKNOWN) {}
+
CFWL_BarcodeImp::CFWL_BarcodeImp(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
: CFWL_EditImp(properties, pOuter),
« no previous file with comments | « xfa/include/fwl/core/fwl_widget.h ('k') | xfa/src/fwl/src/basewidget/fwl_caretimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698