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

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

Issue 2433133002: Remove IFWL_*::Create methods, use new (Closed)
Patch Set: Rebase to master 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
« no previous file with comments | « xfa/fwl/core/ifwl_combobox.h ('k') | xfa/fwl/core/ifwl_comboedit.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_combobox.cpp
diff --git a/xfa/fwl/core/ifwl_combobox.cpp b/xfa/fwl/core/ifwl_combobox.cpp
index 6a4c13f4a624f7c60db5b62b83e4a38c7a26f902..9d3e58cec6104c265911989ca88039231fbb6a87 100644
--- a/xfa/fwl/core/ifwl_combobox.cpp
+++ b/xfa/fwl/core/ifwl_combobox.cpp
@@ -20,15 +20,8 @@
#include "xfa/fwl/core/ifwl_formproxy.h"
#include "xfa/fwl/core/ifwl_themeprovider.h"
-// static
-IFWL_ComboBox* IFWL_ComboBox::Create(
- const CFWL_WidgetImpProperties& properties) {
- return new IFWL_ComboBox(properties, nullptr);
-}
-
-IFWL_ComboBox::IFWL_ComboBox(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter)
- : IFWL_Widget(properties, pOuter),
+IFWL_ComboBox::IFWL_ComboBox(const CFWL_WidgetImpProperties& properties)
+ : IFWL_Widget(properties, nullptr),
m_pForm(nullptr),
m_bLButtonDown(FALSE),
m_iCurSel(-1),
@@ -66,11 +59,11 @@ FWL_Error IFWL_ComboBox::Initialize() {
prop.m_dwStyleExes |= FWL_STYLEEXT_LTB_Icon;
prop.m_pDataProvider = m_pProperties->m_pDataProvider;
- m_pListBox.reset(IFWL_ComboList::Create(prop, this));
+ m_pListBox.reset(new IFWL_ComboList(prop, this));
m_pListBox->Initialize();
if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_DropDown) && !m_pEdit) {
CFWL_WidgetImpProperties prop2;
- m_pEdit.reset(IFWL_ComboEdit::Create(prop2, this));
+ m_pEdit.reset(new IFWL_ComboEdit(prop2, this));
m_pEdit->Initialize();
m_pEdit->SetOuter(this);
}
@@ -125,7 +118,7 @@ FWL_Error IFWL_ComboBox::ModifyStylesEx(uint32_t dwStylesExAdded,
bool bRemoveDropDown = !!(dwStylesExRemoved & FWL_STYLEEXT_CMB_DropDown);
if (bAddDropDown && !m_pEdit) {
CFWL_WidgetImpProperties prop;
- m_pEdit.reset(IFWL_ComboEdit::Create(prop, nullptr));
+ m_pEdit.reset(new IFWL_ComboEdit(prop, nullptr));
m_pEdit->Initialize();
m_pEdit->SetOuter(this);
m_pEdit->SetParent(this);
@@ -723,7 +716,8 @@ void IFWL_ComboBox::InitProxyForm() {
propForm.m_pOwner = this;
propForm.m_dwStyles = FWL_WGTSTYLE_Popup;
propForm.m_dwStates = FWL_WGTSTATE_Invisible;
- m_pForm = IFWL_FormProxy::Create(propForm, m_pListBox.get());
+
+ m_pForm = new IFWL_FormProxy(propForm, m_pListBox.get());
m_pForm->Initialize();
m_pListBox->SetParent(m_pForm);
m_pListProxyDelegate = new CFWL_ComboProxyImpDelegate(m_pForm, this);
@@ -750,7 +744,7 @@ void IFWL_ComboBox::DisForm_InitComboList() {
prop.m_dwStates = FWL_WGTSTATE_Invisible;
prop.m_pDataProvider = m_pProperties->m_pDataProvider;
prop.m_pThemeProvider = m_pProperties->m_pThemeProvider;
- m_pListBox.reset(IFWL_ComboList::Create(prop, this));
+ m_pListBox.reset(new IFWL_ComboList(prop, this));
m_pListBox->Initialize();
}
@@ -761,7 +755,7 @@ void IFWL_ComboBox::DisForm_InitComboEdit() {
CFWL_WidgetImpProperties prop;
prop.m_pParent = this;
prop.m_pThemeProvider = m_pProperties->m_pThemeProvider;
- m_pEdit.reset(IFWL_ComboEdit::Create(prop, this));
+ m_pEdit.reset(new IFWL_ComboEdit(prop, this));
m_pEdit->Initialize();
m_pEdit->SetOuter(this);
}
« no previous file with comments | « xfa/fwl/core/ifwl_combobox.h ('k') | xfa/fwl/core/ifwl_comboedit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698