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

Unified Diff: xfa/fxfa/app/xfa_ffbarcode.cpp

Issue 2466273003: Change IFWL_Widget to store a single delegate. (Closed)
Patch Set: Fix Mac 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/fxfa/app/cxfa_fftexteditdelegate.cpp ('k') | xfa/fxfa/app/xfa_ffcheckbutton.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_ffbarcode.cpp
diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp
index cd172c5a4da164788c453f2932923f91c38ecc07..8c6dcbfad9514fdc1e81542bf100c650aee3b975 100644
--- a/xfa/fxfa/app/xfa_ffbarcode.cpp
+++ b/xfa/fxfa/app/xfa_ffbarcode.cpp
@@ -7,9 +7,11 @@
#include "xfa/fxfa/app/xfa_ffbarcode.h"
#include "core/fxcrt/fx_ext.h"
+#include "third_party/base/ptr_util.h"
#include "xfa/fwl/core/cfwl_barcode.h"
#include "xfa/fwl/core/fwl_noteimp.h"
#include "xfa/fwl/core/ifwl_app.h"
+#include "xfa/fxfa/app/cxfa_fffielddelegate.h"
#include "xfa/fxfa/app/xfa_fffield.h"
#include "xfa/fxfa/app/xfa_fftextedit.h"
#include "xfa/fxfa/app/xfa_fwladapter.h"
@@ -132,8 +134,8 @@ FX_BOOL CXFA_FFBarcode::LoadWidget() {
CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(pWidget, pWidget);
- m_pOldDelegate = m_pNormalWidget->GetCurrentDelegate();
- m_pNormalWidget->SetCurrentDelegate(this);
+ m_pNormalWidget->SetDelegate(pdfium::MakeUnique<CXFA_FFFieldDelegate>(
+ m_pNormalWidget->ReleaseDelegate(), this));
m_pNormalWidget->LockUpdate();
CFX_WideString wsText;
« no previous file with comments | « xfa/fxfa/app/cxfa_fftexteditdelegate.cpp ('k') | xfa/fxfa/app/xfa_ffcheckbutton.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698