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

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

Issue 2436103002: Remove FWL globals. (Closed)
Patch Set: fix mac Created 4 years, 2 months 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
Index: xfa/fxfa/app/xfa_ffcheckbutton.cpp
diff --git a/xfa/fxfa/app/xfa_ffcheckbutton.cpp b/xfa/fxfa/app/xfa_ffcheckbutton.cpp
index cde99183d78602819bb79ddfc8619cab165450c8..7756506975b6578519077631ffbd64c5ac4edefa 100644
--- a/xfa/fxfa/app/xfa_ffcheckbutton.cpp
+++ b/xfa/fxfa/app/xfa_ffcheckbutton.cpp
@@ -23,14 +23,17 @@ CXFA_FFCheckButton::CXFA_FFCheckButton(CXFA_FFPageView* pPageView,
: CXFA_FFField(pPageView, pDataAcc), m_pOldDelegate(nullptr) {
m_rtCheckBox.Set(0, 0, 0, 0);
}
+
CXFA_FFCheckButton::~CXFA_FFCheckButton() {}
+
FX_BOOL CXFA_FFCheckButton::LoadWidget() {
- CFWL_CheckBox* pCheckBox = new CFWL_CheckBox;
- pCheckBox->Initialize();
+ CFWL_CheckBox* pCheckBox = new CFWL_CheckBox(GetFWLApp());
+ pCheckBox->Initialize(nullptr);
m_pNormalWidget = pCheckBox;
m_pNormalWidget->SetLayoutItem(this);
+
IFWL_Widget* pWidget = m_pNormalWidget->GetWidget();
- CFWL_NoteDriver* pNoteDriver = FWL_GetApp()->GetNoteDriver();
+ CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(pWidget, pWidget);
m_pOldDelegate = m_pNormalWidget->SetDelegate(this);
if (m_pDataAcc->IsRadioButton()) {

Powered by Google App Engine
This is Rietveld 408576698