Remove unused CFWL_FormProxy.

Change-Id: I952cf31cb2e3f5ca19ea3af5e9e4e11881f0a90d
Reviewed-on: https://pdfium-review.googlesource.com/32395
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 614dc47..7846420 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1916,8 +1916,6 @@
       "xfa/fwl/cfwl_eventvalidate.h",
       "xfa/fwl/cfwl_form.cpp",
       "xfa/fwl/cfwl_form.h",
-      "xfa/fwl/cfwl_formproxy.cpp",
-      "xfa/fwl/cfwl_formproxy.h",
       "xfa/fwl/cfwl_listbox.cpp",
       "xfa/fwl/cfwl_listbox.h",
       "xfa/fwl/cfwl_listitem.cpp",
diff --git a/xfa/fwl/README.md b/xfa/fwl/README.md
index 9ee5575..95a0f4c 100644
--- a/xfa/fwl/README.md
+++ b/xfa/fwl/README.md
@@ -5,7 +5,6 @@
 
 * CFWL_Widget
     * CFWL_Form
-        * CFWL_FormProxy
     * CFWL_Caret
     * CFWL_CheckBox
     * CFWL_ComboBox
diff --git a/xfa/fwl/cfwl_combobox.cpp b/xfa/fwl/cfwl_combobox.cpp
index 4513492..8980dc3 100644
--- a/xfa/fwl/cfwl_combobox.cpp
+++ b/xfa/fwl/cfwl_combobox.cpp
@@ -17,7 +17,6 @@
 #include "xfa/fwl/cfwl_event.h"
 #include "xfa/fwl/cfwl_eventselectchanged.h"
 #include "xfa/fwl/cfwl_eventtextchanged.h"
-#include "xfa/fwl/cfwl_formproxy.h"
 #include "xfa/fwl/cfwl_listbox.h"
 #include "xfa/fwl/cfwl_messagekey.h"
 #include "xfa/fwl/cfwl_messagekillfocus.h"
diff --git a/xfa/fwl/cfwl_combobox.h b/xfa/fwl/cfwl_combobox.h
index 93084df..a5ea2d0 100644
--- a/xfa/fwl/cfwl_combobox.h
+++ b/xfa/fwl/cfwl_combobox.h
@@ -17,7 +17,6 @@
 
 class CFWL_WidgetProperties;
 class CFWL_ComboBox;
-class CFWL_FormProxy;
 class CFWL_ListBox;
 class CFWL_Widget;
 
diff --git a/xfa/fwl/cfwl_datetimepicker.cpp b/xfa/fwl/cfwl_datetimepicker.cpp
index 3ed2dce..f5afbf6 100644
--- a/xfa/fwl/cfwl_datetimepicker.cpp
+++ b/xfa/fwl/cfwl_datetimepicker.cpp
@@ -12,7 +12,6 @@
 #include "third_party/base/ptr_util.h"
 #include "xfa/fwl/cfwl_event.h"
 #include "xfa/fwl/cfwl_eventselectchanged.h"
-#include "xfa/fwl/cfwl_formproxy.h"
 #include "xfa/fwl/cfwl_messagemouse.h"
 #include "xfa/fwl/cfwl_messagesetfocus.h"
 #include "xfa/fwl/cfwl_notedriver.h"
@@ -328,22 +327,6 @@
   DispatchEvent(&ev);
 }
 
-void CFWL_DateTimePicker::InitProxyForm() {
-  if (m_pForm)
-    return;
-  if (!m_pMonthCal)
-    return;
-
-  auto prop = pdfium::MakeUnique<CFWL_WidgetProperties>();
-  prop->m_dwStyles = FWL_WGTSTYLE_Popup;
-  prop->m_dwStates = FWL_WGTSTATE_Invisible;
-  prop->m_pOwner = this;
-
-  m_pForm = pdfium::MakeUnique<CFWL_FormProxy>(
-      m_pOwnerApp.Get(), std::move(prop), m_pMonthCal.get());
-  m_pMonthCal->SetParent(m_pForm.get());
-}
-
 bool CFWL_DateTimePicker::NeedsToShowButton() const {
   return m_pProperties->m_dwStates & FWL_WGTSTATE_Focused ||
          m_pMonthCal->GetStates() & FWL_WGTSTATE_Focused ||
diff --git a/xfa/fwl/cfwl_datetimepicker.h b/xfa/fwl/cfwl_datetimepicker.h
index cf0bc2c..00e7f61 100644
--- a/xfa/fwl/cfwl_datetimepicker.h
+++ b/xfa/fwl/cfwl_datetimepicker.h
@@ -29,7 +29,6 @@
 #define FWL_STYLEEXT_DTP_EditVAlignMask (3L << 6)
 
 class CFWL_DateTimeEdit;
-class CFWL_FormProxy;
 
 class CFWL_DateTimePicker : public CFWL_Widget {
  public:
@@ -66,15 +65,12 @@
   void ShowMonthCalendar(bool bActivate);
   void ProcessSelChanged(int32_t iYear, int32_t iMonth, int32_t iDay);
 
-  CFWL_FormProxy* GetFormProxy() const { return m_pForm.get(); }
-
  private:
   void DrawDropDownButton(CXFA_Graphics* pGraphics,
                           IFWL_ThemeProvider* pTheme,
                           const CFX_Matrix* pMatrix);
   WideString FormatDateString(int32_t iYear, int32_t iMonth, int32_t iDay);
   void ResetEditAlignment();
-  void InitProxyForm();
   void GetPopupPos(float fMinHeight,
                    float fMaxHeight,
                    const CFX_RectF& rtAnchor,
@@ -96,7 +92,6 @@
   bool m_bLBtnDown;
   std::unique_ptr<CFWL_DateTimeEdit> m_pEdit;
   std::unique_ptr<CFWL_MonthCalendar> m_pMonthCal;
-  std::unique_ptr<CFWL_FormProxy> m_pForm;
   float m_fBtn;
 };
 
diff --git a/xfa/fwl/cfwl_form.cpp b/xfa/fwl/cfwl_form.cpp
index d1c1783..f2ae46d 100644
--- a/xfa/fwl/cfwl_form.cpp
+++ b/xfa/fwl/cfwl_form.cpp
@@ -12,7 +12,6 @@
 #include "xfa/fde/cfde_textout.h"
 #include "xfa/fwl/cfwl_app.h"
 #include "xfa/fwl/cfwl_event.h"
-#include "xfa/fwl/cfwl_formproxy.h"
 #include "xfa/fwl/cfwl_messagemouse.h"
 #include "xfa/fwl/cfwl_notedriver.h"
 #include "xfa/fwl/cfwl_noteloop.h"
diff --git a/xfa/fwl/cfwl_form.h b/xfa/fwl/cfwl_form.h
index cac1747..01ae9be 100644
--- a/xfa/fwl/cfwl_form.h
+++ b/xfa/fwl/cfwl_form.h
@@ -14,7 +14,6 @@
 #include "xfa/fwl/cfwl_widgetproperties.h"
 
 #define FWL_CLASS_Form L"FWL_FORM"
-#define FWL_CLASS_FormProxy L"FWL_FORMPROXY"
 
 class CFWL_MessageMouse;
 class CFWL_NoteLoop;
diff --git a/xfa/fwl/cfwl_formproxy.cpp b/xfa/fwl/cfwl_formproxy.cpp
deleted file mode 100644
index d03c148..0000000
--- a/xfa/fwl/cfwl_formproxy.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#include "xfa/fwl/cfwl_formproxy.h"
-
-#include <memory>
-#include <utility>
-
-#include "third_party/base/ptr_util.h"
-#include "xfa/fwl/cfwl_notedriver.h"
-
-CFWL_FormProxy::CFWL_FormProxy(
-    const CFWL_App* app,
-    std::unique_ptr<CFWL_WidgetProperties> properties,
-    CFWL_Widget* pOuter)
-    : CFWL_Form(app, std::move(properties), pOuter) {}
-
-CFWL_FormProxy::~CFWL_FormProxy() {}
-
-FWL_Type CFWL_FormProxy::GetClassID() const {
-  return FWL_Type::FormProxy;
-}
-
-bool CFWL_FormProxy::IsInstance(const WideStringView& wsClass) const {
-  if (wsClass == WideStringView(FWL_CLASS_FormProxy))
-    return true;
-  return CFWL_Form::IsInstance(wsClass);
-}
-
-void CFWL_FormProxy::Update() {}
-
-void CFWL_FormProxy::DrawWidget(CXFA_Graphics* pGraphics,
-                                const CFX_Matrix& matrix) {}
-
-void CFWL_FormProxy::OnProcessMessage(CFWL_Message* pMessage) {
-  m_pOuter->GetDelegate()->OnProcessMessage(pMessage);
-}
diff --git a/xfa/fwl/cfwl_formproxy.h b/xfa/fwl/cfwl_formproxy.h
deleted file mode 100644
index 498ff42..0000000
--- a/xfa/fwl/cfwl_formproxy.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef XFA_FWL_CFWL_FORMPROXY_H_
-#define XFA_FWL_CFWL_FORMPROXY_H_
-
-#include <memory>
-
-#include "xfa/fwl/cfwl_form.h"
-
-class CFWL_WidgetProperties;
-
-class CFWL_FormProxy : public CFWL_Form {
- public:
-  CFWL_FormProxy(const CFWL_App* app,
-                 std::unique_ptr<CFWL_WidgetProperties> properties,
-                 CFWL_Widget* pOuter);
-  ~CFWL_FormProxy() override;
-
-  // CFWL_Widget
-  FWL_Type GetClassID() const override;
-  bool IsInstance(const WideStringView& wsClass) const override;
-  void Update() override;
-  void DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) override;
-  void OnProcessMessage(CFWL_Message* pMessage) override;
-};
-
-#endif  // XFA_FWL_CFWL_FORMPROXY_H_
diff --git a/xfa/fwl/cfwl_monthcalendar.cpp b/xfa/fwl/cfwl_monthcalendar.cpp
index 7f4c1eb..8ac67e6 100644
--- a/xfa/fwl/cfwl_monthcalendar.cpp
+++ b/xfa/fwl/cfwl_monthcalendar.cpp
@@ -14,7 +14,6 @@
 #include "third_party/base/stl_util.h"
 #include "xfa/fde/cfde_textout.h"
 #include "xfa/fwl/cfwl_datetimepicker.h"
-#include "xfa/fwl/cfwl_formproxy.h"
 #include "xfa/fwl/cfwl_messagemouse.h"
 #include "xfa/fwl/cfwl_notedriver.h"
 #include "xfa/fwl/cfwl_themebackground.h"