Remove FWL Create methods, use new instead

Review-Url: https://chromiumcodereview.appspot.com/2422303003
diff --git a/xfa/fwl/lightwidget/cfwl_barcode.cpp b/xfa/fwl/lightwidget/cfwl_barcode.cpp
index 24dce17..dd8d9f0 100644
--- a/xfa/fwl/lightwidget/cfwl_barcode.cpp
+++ b/xfa/fwl/lightwidget/cfwl_barcode.cpp
@@ -16,10 +16,6 @@
   return static_cast<IFWL_Barcode*>(m_pIface.get());
 }
 
-CFWL_Barcode* CFWL_Barcode::Create() {
-  return new CFWL_Barcode;
-}
-
 FWL_Error CFWL_Barcode::Initialize(const CFWL_WidgetProperties* pProperties) {
   if (m_pIface)
     return FWL_Error::Indefinite;
diff --git a/xfa/fwl/lightwidget/cfwl_barcode.h b/xfa/fwl/lightwidget/cfwl_barcode.h
index cf394f6..83a58c1 100644
--- a/xfa/fwl/lightwidget/cfwl_barcode.h
+++ b/xfa/fwl/lightwidget/cfwl_barcode.h
@@ -16,7 +16,8 @@
 
 class CFWL_Barcode : public CFWL_Edit {
  public:
-  static CFWL_Barcode* Create();
+  CFWL_Barcode();
+  ~CFWL_Barcode() override;
 
   IFWL_Barcode* GetWidget() override;
   const IFWL_Barcode* GetWidget() const override;
@@ -83,9 +84,6 @@
   }
 
  protected:
-  CFWL_Barcode();
-  ~CFWL_Barcode() override;
-
   class CFWL_BarcodeDP : public IFWL_BarcodeDP {
    public:
     CFWL_BarcodeDP();
diff --git a/xfa/fwl/lightwidget/cfwl_checkbox.cpp b/xfa/fwl/lightwidget/cfwl_checkbox.cpp
index 1f59ee1..d14ed51 100644
--- a/xfa/fwl/lightwidget/cfwl_checkbox.cpp
+++ b/xfa/fwl/lightwidget/cfwl_checkbox.cpp
@@ -18,10 +18,6 @@
   return static_cast<IFWL_CheckBox*>(m_pIface.get());
 }
 
-CFWL_CheckBox* CFWL_CheckBox::Create() {
-  return new CFWL_CheckBox;
-}
-
 FWL_Error CFWL_CheckBox::Initialize(const CFWL_WidgetProperties* pProperties) {
   if (m_pIface)
     return FWL_Error::Indefinite;
diff --git a/xfa/fwl/lightwidget/cfwl_checkbox.h b/xfa/fwl/lightwidget/cfwl_checkbox.h
index 51e6294..ef66280 100644
--- a/xfa/fwl/lightwidget/cfwl_checkbox.h
+++ b/xfa/fwl/lightwidget/cfwl_checkbox.h
@@ -18,8 +18,6 @@
   IFWL_CheckBox* GetWidget() override;
   const IFWL_CheckBox* GetWidget() const override;
 
-  static CFWL_CheckBox* Create();
-
   FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = nullptr);
   FWL_Error SetCaption(const CFX_WideStringC& wsCaption);
   FWL_Error SetBoxSize(FX_FLOAT fHeight);
diff --git a/xfa/fwl/lightwidget/cfwl_combobox.cpp b/xfa/fwl/lightwidget/cfwl_combobox.cpp
index 678edc4..4ec323a 100644
--- a/xfa/fwl/lightwidget/cfwl_combobox.cpp
+++ b/xfa/fwl/lightwidget/cfwl_combobox.cpp
@@ -19,10 +19,6 @@
   return static_cast<IFWL_ComboBox*>(m_pIface.get());
 }
 
-CFWL_ComboBox* CFWL_ComboBox::Create() {
-  return new CFWL_ComboBox;
-}
-
 FWL_Error CFWL_ComboBox::Initialize(const CFWL_WidgetProperties* pProperties) {
   if (m_pIface)
     return FWL_Error::Indefinite;
diff --git a/xfa/fwl/lightwidget/cfwl_combobox.h b/xfa/fwl/lightwidget/cfwl_combobox.h
index 186d4b7..bbcec3b 100644
--- a/xfa/fwl/lightwidget/cfwl_combobox.h
+++ b/xfa/fwl/lightwidget/cfwl_combobox.h
@@ -26,7 +26,6 @@
   IFWL_ComboBox* GetWidget() override;
   const IFWL_ComboBox* GetWidget() const override;
 
-  static CFWL_ComboBox* Create();
   FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = nullptr);
   int32_t AddString(const CFX_WideStringC& wsText);
   int32_t AddString(const CFX_WideStringC& wsText, CFX_DIBitmap* pIcon);
diff --git a/xfa/fwl/lightwidget/cfwl_datetimepicker.cpp b/xfa/fwl/lightwidget/cfwl_datetimepicker.cpp
index 1256e1a..828f9cf 100644
--- a/xfa/fwl/lightwidget/cfwl_datetimepicker.cpp
+++ b/xfa/fwl/lightwidget/cfwl_datetimepicker.cpp
@@ -20,10 +20,6 @@
   return static_cast<IFWL_DateTimePicker*>(m_pIface.get());
 }
 
-CFWL_DateTimePicker* CFWL_DateTimePicker::Create() {
-  return new CFWL_DateTimePicker;
-}
-
 FWL_Error CFWL_DateTimePicker::Initialize(
     const CFWL_WidgetProperties* pProperties) {
   if (m_pIface)
diff --git a/xfa/fwl/lightwidget/cfwl_datetimepicker.h b/xfa/fwl/lightwidget/cfwl_datetimepicker.h
index d727729..e73919c 100644
--- a/xfa/fwl/lightwidget/cfwl_datetimepicker.h
+++ b/xfa/fwl/lightwidget/cfwl_datetimepicker.h
@@ -12,7 +12,8 @@
 
 class CFWL_DateTimePicker : public CFWL_Widget {
  public:
-  static CFWL_DateTimePicker* Create();
+  CFWL_DateTimePicker();
+  ~CFWL_DateTimePicker() override;
 
   IFWL_DateTimePicker* GetWidget() override;
   const IFWL_DateTimePicker* GetWidget() const override;
@@ -63,9 +64,6 @@
     CFX_WideString m_wsData;
   };
 
-  CFWL_DateTimePicker();
-  ~CFWL_DateTimePicker() override;
-
   CFWL_DateTimePickerDP m_DateTimePickerDP;
 };
 
diff --git a/xfa/fwl/lightwidget/cfwl_edit.cpp b/xfa/fwl/lightwidget/cfwl_edit.cpp
index b74cd05..5637040 100644
--- a/xfa/fwl/lightwidget/cfwl_edit.cpp
+++ b/xfa/fwl/lightwidget/cfwl_edit.cpp
@@ -17,10 +17,6 @@
   return static_cast<IFWL_Edit*>(m_pIface.get());
 }
 
-CFWL_Edit* CFWL_Edit::Create() {
-  return new CFWL_Edit;
-}
-
 FWL_Error CFWL_Edit::Initialize(const CFWL_WidgetProperties* pProperties) {
   if (m_pIface)
     return FWL_Error::Indefinite;
diff --git a/xfa/fwl/lightwidget/cfwl_edit.h b/xfa/fwl/lightwidget/cfwl_edit.h
index a9a466a..6c70c43 100644
--- a/xfa/fwl/lightwidget/cfwl_edit.h
+++ b/xfa/fwl/lightwidget/cfwl_edit.h
@@ -23,7 +23,6 @@
   IFWL_Edit* GetWidget() override;
   const IFWL_Edit* GetWidget() const override;
 
-  static CFWL_Edit* Create();
   FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = nullptr);
   FWL_Error SetText(const CFX_WideString& wsText);
   int32_t GetTextLength() const;
diff --git a/xfa/fwl/lightwidget/cfwl_listbox.cpp b/xfa/fwl/lightwidget/cfwl_listbox.cpp
index d5ea879..eb984d6 100644
--- a/xfa/fwl/lightwidget/cfwl_listbox.cpp
+++ b/xfa/fwl/lightwidget/cfwl_listbox.cpp
@@ -18,10 +18,6 @@
   return static_cast<IFWL_ListBox*>(m_pIface.get());
 }
 
-CFWL_ListBox* CFWL_ListBox::Create() {
-  return new CFWL_ListBox;
-}
-
 FWL_Error CFWL_ListBox::Initialize(const CFWL_WidgetProperties* pProperties) {
   if (m_pIface)
     return FWL_Error::Indefinite;
diff --git a/xfa/fwl/lightwidget/cfwl_listbox.h b/xfa/fwl/lightwidget/cfwl_listbox.h
index f647ae8..a3bba8b 100644
--- a/xfa/fwl/lightwidget/cfwl_listbox.h
+++ b/xfa/fwl/lightwidget/cfwl_listbox.h
@@ -25,7 +25,6 @@
   IFWL_ListBox* GetWidget() override;
   const IFWL_ListBox* GetWidget() const override;
 
-  static CFWL_ListBox* Create();
   FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = nullptr);
   FWL_Error AddDIBitmap(CFX_DIBitmap* pDIB, IFWL_ListItem* pItem);
   IFWL_ListItem* AddString(const CFX_WideStringC& wsAdd,
diff --git a/xfa/fwl/lightwidget/cfwl_picturebox.cpp b/xfa/fwl/lightwidget/cfwl_picturebox.cpp
index 8e0cc60..e6328e7 100644
--- a/xfa/fwl/lightwidget/cfwl_picturebox.cpp
+++ b/xfa/fwl/lightwidget/cfwl_picturebox.cpp
@@ -16,10 +16,6 @@
   return static_cast<IFWL_PictureBox*>(m_pIface.get());
 }
 
-CFWL_PictureBox* CFWL_PictureBox::Create() {
-  return new CFWL_PictureBox;
-}
-
 FWL_Error CFWL_PictureBox::Initialize(
     const CFWL_WidgetProperties* pProperties) {
   if (m_pIface)
diff --git a/xfa/fwl/lightwidget/cfwl_picturebox.h b/xfa/fwl/lightwidget/cfwl_picturebox.h
index 612ff1d..c039892 100644
--- a/xfa/fwl/lightwidget/cfwl_picturebox.h
+++ b/xfa/fwl/lightwidget/cfwl_picturebox.h
@@ -19,8 +19,6 @@
   IFWL_PictureBox* GetWidget() override;
   const IFWL_PictureBox* GetWidget() const override;
 
-  static CFWL_PictureBox* Create();
-
   FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = nullptr);
   CFX_DIBitmap* GetPicture();
   FWL_Error SetPicture(CFX_DIBitmap* pBitmap);
diff --git a/xfa/fwl/lightwidget/cfwl_pushbutton.cpp b/xfa/fwl/lightwidget/cfwl_pushbutton.cpp
index b103169..79afe80 100644
--- a/xfa/fwl/lightwidget/cfwl_pushbutton.cpp
+++ b/xfa/fwl/lightwidget/cfwl_pushbutton.cpp
@@ -16,10 +16,6 @@
   return static_cast<IFWL_PushButton*>(m_pIface.get());
 }
 
-CFWL_PushButton* CFWL_PushButton::Create() {
-  return new CFWL_PushButton;
-}
-
 FWL_Error CFWL_PushButton::Initialize(
     const CFWL_WidgetProperties* pProperties) {
   if (m_pIface)
diff --git a/xfa/fwl/lightwidget/cfwl_pushbutton.h b/xfa/fwl/lightwidget/cfwl_pushbutton.h
index ce26a54..13629fa 100644
--- a/xfa/fwl/lightwidget/cfwl_pushbutton.h
+++ b/xfa/fwl/lightwidget/cfwl_pushbutton.h
@@ -18,8 +18,6 @@
   IFWL_PushButton* GetWidget() override;
   const IFWL_PushButton* GetWidget() const override;
 
-  static CFWL_PushButton* Create();
-
   FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = nullptr);
   FWL_Error GetCaption(CFX_WideString& wsCaption);
   FWL_Error SetCaption(const CFX_WideStringC& wsCaption);