Add still more UnownedPtr<> conversions.

Change-Id: I8eb497069fadb3558532c2b3a5027bed6ed1cf8d
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/78890
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxge/win32/cfx_psrenderer.h b/core/fxge/win32/cfx_psrenderer.h
index 8ecd1bf..0136092 100644
--- a/core/fxge/win32/cfx_psrenderer.h
+++ b/core/fxge/win32/cfx_psrenderer.h
@@ -15,6 +15,7 @@
 #include "core/fxcrt/fx_stream.h"
 #include "core/fxcrt/fx_system.h"
 #include "core/fxcrt/retain_ptr.h"
+#include "core/fxcrt/unowned_ptr.h"
 #include "core/fxge/cfx_graphstatedata.h"
 
 class CFX_DIBBase;
@@ -127,7 +128,7 @@
   uint32_t m_LastColor = 0;
   FX_RECT m_ClipBox;
   CFX_GraphStateData m_CurGraphState;
-  const EncoderIface* const m_pEncoderIface;
+  UnownedPtr<const EncoderIface> const m_pEncoderIface;
   RetainPtr<IFX_RetainableWriteStream> m_pStream;
   std::vector<std::unique_ptr<CPSFont>> m_PSFontList;
   std::vector<FX_RECT> m_ClipBoxStack;
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.h b/fpdfsdk/cpdfsdk_formfillenvironment.h
index 6f26b92..5d46763 100644
--- a/fpdfsdk/cpdfsdk_formfillenvironment.h
+++ b/fpdfsdk/cpdfsdk_formfillenvironment.h
@@ -220,7 +220,7 @@
   IPDF_Page* GetPage(int nIndex);
   void SendOnFocusChange(ObservedPtr<CPDFSDK_Annot>* pAnnot);
 
-  FPDF_FORMFILLINFO* const m_pInfo;
+  UnownedPtr<FPDF_FORMFILLINFO> const m_pInfo;
   std::unique_ptr<CPDFSDK_ActionHandler> m_pActionHandler;
   std::unique_ptr<IJS_Runtime> m_pIJSRuntime;
   std::map<IPDF_Page*, std::unique_ptr<CPDFSDK_PageView>> m_PageMap;
diff --git a/fpdfsdk/cpdfsdk_pageview.h b/fpdfsdk/cpdfsdk_pageview.h
index 50680f3..b47c226 100644
--- a/fpdfsdk/cpdfsdk_pageview.h
+++ b/fpdfsdk/cpdfsdk_pageview.h
@@ -108,7 +108,7 @@
                   uint32_t nFlag);
 
   CFX_Matrix m_curMatrix;
-  IPDF_Page* const m_page;
+  UnownedPtr<IPDF_Page> const m_page;
   std::unique_ptr<CPDF_AnnotList> m_pAnnotList;
   std::vector<CPDFSDK_Annot*> m_SDKAnnotArray;
   UnownedPtr<CPDFSDK_FormFillEnvironment> const m_pFormFillEnv;
diff --git a/fpdfsdk/formfiller/cffl_privatedata.h b/fpdfsdk/formfiller/cffl_privatedata.h
index 464f60b..f8c4e0c 100644
--- a/fpdfsdk/formfiller/cffl_privatedata.h
+++ b/fpdfsdk/formfiller/cffl_privatedata.h
@@ -8,6 +8,7 @@
 #define FPDFSDK_FORMFILLER_CFFL_PRIVATEDATA_H_
 
 #include "core/fxcrt/observed_ptr.h"
+#include "core/fxcrt/unowned_ptr.h"
 #include "fpdfsdk/pwl/ipwl_systemhandler.h"
 
 class CPDFSDK_PageView;
@@ -36,7 +37,7 @@
   CFFL_PrivateData(const CFFL_PrivateData& that);
 
   ObservedPtr<CPDFSDK_Widget> m_pWidget;
-  CPDFSDK_PageView* const m_pPageView;
+  UnownedPtr<CPDFSDK_PageView> const m_pPageView;
   const uint32_t m_nAppearanceAge;
   const uint32_t m_nValueAge;
 };
diff --git a/fpdfsdk/pwl/cpwl_edit_impl.h b/fpdfsdk/pwl/cpwl_edit_impl.h
index e118077..3e3950a 100644
--- a/fpdfsdk/pwl/cpwl_edit_impl.h
+++ b/fpdfsdk/pwl/cpwl_edit_impl.h
@@ -437,7 +437,7 @@
 
  private:
   UnownedPtr<CPWL_EditImpl> m_pEdit;
-  CPDF_VariableText::Iterator* m_pVTIterator;
+  UnownedPtr<CPDF_VariableText::Iterator> m_pVTIterator;
 };
 
 class CPWL_EditImpl_Provider final : public CPDF_VariableText::Provider {
@@ -458,7 +458,7 @@
   bool IsLatinWord(uint16_t word) override;
 
  private:
-  IPVT_FontMap* m_pFontMap;
+  UnownedPtr<IPVT_FontMap> m_pFontMap;
 };
 
 #endif  // FPDFSDK_PWL_CPWL_EDIT_IMPL_H_
diff --git a/xfa/fgas/graphics/cfgas_gegraphics.h b/xfa/fgas/graphics/cfgas_gegraphics.h
index 395c425..94e2ed0 100644
--- a/xfa/fgas/graphics/cfgas_gegraphics.h
+++ b/xfa/fgas/graphics/cfgas_gegraphics.h
@@ -82,7 +82,7 @@
   void SetDIBitsWithMatrix(const RetainPtr<CFX_DIBBase>& source,
                            const CFX_Matrix& matrix);
 
-  CFX_RenderDevice* const m_renderDevice;  // Not owned.
+  UnownedPtr<CFX_RenderDevice> const m_renderDevice;
   TInfo m_info;
   std::vector<std::unique_ptr<TInfo>> m_infoStack;
 };