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

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

Issue 2433133002: Remove IFWL_*::Create methods, use new (Closed)
Patch Set: 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/fwl/core/ifwl_edit.cpp
diff --git a/xfa/fwl/core/ifwl_edit.cpp b/xfa/fwl/core/ifwl_edit.cpp
index 83c00627c3b741ae6a4c63c276440ada8ab69b2c..b99651af4d38f6c740c231e66557d3a9edfa0a46 100644
--- a/xfa/fwl/core/ifwl_edit.cpp
+++ b/xfa/fwl/core/ifwl_edit.cpp
@@ -10,6 +10,7 @@
#include <memory>
#include <vector>
+#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
#include "xfa/fde/cfde_txtedtengine.h"
#include "xfa/fde/fde_gedevice.h"
@@ -51,12 +52,6 @@ void AddSquigglyPath(CFX_Path* pPathData,
} // namespace
-// static
-IFWL_Edit* IFWL_Edit::Create(const CFWL_WidgetImpProperties& properties,
- IFWL_Widget* pOuter) {
- return new IFWL_Edit(properties, pOuter);
-}
-
IFWL_Edit::IFWL_Edit(const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
: IFWL_Widget(properties, pOuter),
@@ -1482,7 +1477,7 @@ void IFWL_Edit::InitScrollBar(FX_BOOL bVert) {
prop.m_dwStates = FWL_WGTSTATE_Disabled | FWL_WGTSTATE_Invisible;
prop.m_pParent = this;
prop.m_pThemeProvider = m_pProperties->m_pThemeProvider;
- IFWL_ScrollBar* pScrollBar = IFWL_ScrollBar::Create(prop, this);
+ IFWL_ScrollBar* pScrollBar = new IFWL_ScrollBar(prop, this);
pScrollBar->Initialize();
(bVert ? &m_pVertScrollBar : &m_pHorzScrollBar)->reset(pScrollBar);
}
@@ -1580,7 +1575,7 @@ void IFWL_Edit::InitCaret() {
if (!m_pCaret) {
if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_InnerCaret)) {
CFWL_WidgetImpProperties prop;
- m_pCaret.reset(IFWL_Caret::Create(prop, this));
+ m_pCaret = pdfium::MakeUnique<IFWL_Caret>(prop, this);
m_pCaret->Initialize();
m_pCaret->SetParent(this);
m_pCaret->SetStates(m_pProperties->m_dwStates);

Powered by Google App Engine
This is Rietveld 408576698