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

Unified Diff: xfa/fwl/core/ifwl_barcode.cpp

Issue 2467993003: Merge delegates into IFWL_* classes. (Closed)
Patch Set: Add const version Created 4 years, 1 month 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/fwl/core/ifwl_barcode.h ('k') | xfa/fwl/core/ifwl_caret.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_barcode.cpp
diff --git a/xfa/fwl/core/ifwl_barcode.cpp b/xfa/fwl/core/ifwl_barcode.cpp
index 9a2d91a4597c9d487d54db8eecfe0a1a53792619..e708e7ed5329fc9cf815dc3da3673452fa268e9c 100644
--- a/xfa/fwl/core/ifwl_barcode.cpp
+++ b/xfa/fwl/core/ifwl_barcode.cpp
@@ -16,7 +16,6 @@
IFWL_Barcode::IFWL_Barcode(const IFWL_App* app,
const CFWL_WidgetImpProperties& properties)
: IFWL_Edit(app, properties, nullptr), m_dwStatus(0), m_type(BC_UNKNOWN) {
- SetDelegate(pdfium::MakeUnique<CFWL_BarcodeImpDelegate>(this));
}
IFWL_Barcode::~IFWL_Barcode() {}
@@ -175,14 +174,10 @@ FX_BOOL IFWL_Barcode::IsProtectedType() {
return FALSE;
}
-CFWL_BarcodeImpDelegate::CFWL_BarcodeImpDelegate(IFWL_Barcode* pOwner)
- : CFWL_EditImpDelegate(pOwner) {}
-
-void CFWL_BarcodeImpDelegate::OnProcessEvent(CFWL_Event* pEvent) {
+void IFWL_Barcode::OnProcessEvent(CFWL_Event* pEvent) {
if (pEvent->GetClassID() == CFWL_EventType::TextChanged) {
- IFWL_Barcode* pOwner = static_cast<IFWL_Barcode*>(m_pOwner);
- pOwner->m_pBarcodeEngine.reset();
- pOwner->m_dwStatus = XFA_BCS_NeedUpdate;
+ m_pBarcodeEngine.reset();
+ m_dwStatus = XFA_BCS_NeedUpdate;
}
- CFWL_EditImpDelegate::OnProcessEvent(pEvent);
+ IFWL_Edit::OnProcessEvent(pEvent);
}
« no previous file with comments | « xfa/fwl/core/ifwl_barcode.h ('k') | xfa/fwl/core/ifwl_caret.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698