Replace CPDF_Page::GetView() with ClearView()

Rather than handing a caller an unowned reference, do cleanup by
extending the existing CPDF_Page::View interface. Result is that
logic moves from top-level fpdf files into the classes themselves,
avoiding a cast in the process.

Change-Id: I047cb130d9bcd09d2b5e16279d92797cc18167b8
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/96314
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_pageview.h b/fpdfsdk/cpdfsdk_pageview.h
index 1cb25d5..6e5f605 100644
--- a/fpdfsdk/cpdfsdk_pageview.h
+++ b/fpdfsdk/cpdfsdk_pageview.h
@@ -33,6 +33,9 @@
   CPDFSDK_PageView(CPDFSDK_FormFillEnvironment* pFormFillEnv, IPDF_Page* page);
   ~CPDFSDK_PageView();
 
+  // CPDF_Page::View:
+  void ClearPage(CPDF_Page* pPage) override;
+
   void PageView_OnDraw(CFX_RenderDevice* pDevice,
                        const CFX_Matrix& mtUser2Device,
                        CPDF_RenderOptions* pOptions,