Remove unused RetainPtr::BackPointer()

With BackPointer() gone, retain_ptr.h no longer needs to include
unowned_ptr.h. Remove that and then fix IWYU build errors.

Change-Id: I54c96a77f6999f9008c712458ba44218f7eb30cd
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/119574
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Thomas Sepez <tsepez@google.com>
diff --git a/core/fxcrt/retain_ptr.h b/core/fxcrt/retain_ptr.h
index d13f0af..d87b76e 100644
--- a/core/fxcrt/retain_ptr.h
+++ b/core/fxcrt/retain_ptr.h
@@ -14,7 +14,6 @@
 
 #include "core/fxcrt/check.h"
 #include "core/fxcrt/compiler_specific.h"
-#include "core/fxcrt/unowned_ptr.h"
 
 namespace fxcrt {
 
@@ -122,7 +121,6 @@
   operator T*() const noexcept { return Get(); }
   T* Get() const noexcept { return m_pObj.get(); }
 
-  UnownedPtr<T> BackPointer() const { return UnownedPtr<T>(Get()); }
   void Swap(RetainPtr& that) { m_pObj.swap(that.m_pObj); }
 
   // Useful for passing notion of object ownership across a C API.
diff --git a/fxjs/xfa/cfxjse_formcalc_context.h b/fxjs/xfa/cfxjse_formcalc_context.h
index 79fd891..6757b08 100644
--- a/fxjs/xfa/cfxjse_formcalc_context.h
+++ b/fxjs/xfa/cfxjse_formcalc_context.h
@@ -13,6 +13,7 @@
 #include <optional>
 
 #include "core/fxcrt/bytestring.h"
+#include "core/fxcrt/unowned_ptr.h"
 #include "core/fxcrt/widetext_buffer.h"
 #include "fxjs/xfa/fxjse.h"
 #include "v8/include/cppgc/persistent.h"
diff --git a/xfa/fxfa/formcalc/cxfa_fmparser.h b/xfa/fxfa/formcalc/cxfa_fmparser.h
index 22ce68d..f4251eb 100644
--- a/xfa/fxfa/formcalc/cxfa_fmparser.h
+++ b/xfa/fxfa/formcalc/cxfa_fmparser.h
@@ -10,6 +10,7 @@
 #include <optional>
 #include <vector>
 
+#include "core/fxcrt/unowned_ptr.h"
 #include "core/fxcrt/unowned_ptr_exclusion.h"
 #include "fxjs/gc/heap.h"
 #include "v8/include/cppgc/macros.h"