Add final keyword to several classes.

Manual review of output of i.e.
  git grep -L final `git grep -l override *.h `

(I was lamenting the lack of 'final' in an unrelated matter.)

Change-Id: Id8ee4fc2b158ac8604d3fb8a57b711e69d3bd848
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/85951
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/page/cpdf_docpagedata.h b/core/fpdfapi/page/cpdf_docpagedata.h
index 2772199..cf30a0d 100644
--- a/core/fpdfapi/page/cpdf_docpagedata.h
+++ b/core/fpdfapi/page/cpdf_docpagedata.h
@@ -30,8 +30,8 @@
 class CPDF_Stream;
 class CPDF_StreamAcc;
 
-class CPDF_DocPageData : public CPDF_Document::PageDataIface,
-                         public CPDF_Font::FormFactoryIface {
+class CPDF_DocPageData final : public CPDF_Document::PageDataIface,
+                               public CPDF_Font::FormFactoryIface {
  public:
   static CPDF_DocPageData* FromDocument(const CPDF_Document* pDoc);
 
diff --git a/core/fpdfapi/parser/cpdf_security_handler.h b/core/fpdfapi/parser/cpdf_security_handler.h
index 15f2b54..9e492c1 100644
--- a/core/fpdfapi/parser/cpdf_security_handler.h
+++ b/core/fpdfapi/parser/cpdf_security_handler.h
@@ -19,7 +19,7 @@
 class CPDF_Array;
 class CPDF_Dictionary;
 
-class CPDF_SecurityHandler : public Retainable {
+class CPDF_SecurityHandler final : public Retainable {
  public:
   CONSTRUCT_VIA_MAKE_RETAIN;
 
diff --git a/core/fpdfapi/render/cpdf_pagerendercache.h b/core/fpdfapi/render/cpdf_pagerendercache.h
index 40f3fe2..e7b9530 100644
--- a/core/fpdfapi/render/cpdf_pagerendercache.h
+++ b/core/fpdfapi/render/cpdf_pagerendercache.h
@@ -24,7 +24,7 @@
 class CPDF_Stream;
 class PauseIndicatorIface;
 
-class CPDF_PageRenderCache : public CPDF_Page::RenderCacheIface {
+class CPDF_PageRenderCache final : public CPDF_Page::RenderCacheIface {
  public:
   explicit CPDF_PageRenderCache(CPDF_Page* pPage);
   ~CPDF_PageRenderCache() override;
diff --git a/core/fpdfdoc/cpdf_annotlist.h b/core/fpdfdoc/cpdf_annotlist.h
index 6ec7ee5..ef87043 100644
--- a/core/fpdfdoc/cpdf_annotlist.h
+++ b/core/fpdfdoc/cpdf_annotlist.h
@@ -24,7 +24,7 @@
 class CPDF_RenderContext;
 class CPDF_RenderOptions;
 
-class CPDF_AnnotList : public CPDF_PageRenderContext::AnnotListIface {
+class CPDF_AnnotList final : public CPDF_PageRenderContext::AnnotListIface {
  public:
   explicit CPDF_AnnotList(CPDF_Page* pPage);
   ~CPDF_AnnotList() override;
diff --git a/core/fpdfdoc/cpdf_linklist.h b/core/fpdfdoc/cpdf_linklist.h
index 9dcbaf8..a315843 100644
--- a/core/fpdfdoc/cpdf_linklist.h
+++ b/core/fpdfdoc/cpdf_linklist.h
@@ -19,7 +19,7 @@
 class CPDF_Page;
 class CPDF_Dictionary;
 
-class CPDF_LinkList : public CPDF_Document::LinkListIface {
+class CPDF_LinkList final : public CPDF_Document::LinkListIface {
  public:
   CPDF_LinkList();
   ~CPDF_LinkList() override;
diff --git a/core/fxcodec/progressive_decoder.h b/core/fxcodec/progressive_decoder.h
index e9f74ba..f7bee03 100644
--- a/core/fxcodec/progressive_decoder.h
+++ b/core/fxcodec/progressive_decoder.h
@@ -43,7 +43,7 @@
 
 class Dummy {};  // Placeholder to work around C++ syntax issues
 
-class ProgressiveDecoder :
+class ProgressiveDecoder final :
 #ifdef PDF_ENABLE_XFA_BMP
     public BmpDecoder::Delegate,
 #endif  // PDF_ENABLE_XFA_BMP
diff --git a/core/fxge/apple/fx_apple_platform.h b/core/fxge/apple/fx_apple_platform.h
index 76b252d..afbf114 100644
--- a/core/fxge/apple/fx_apple_platform.h
+++ b/core/fxge/apple/fx_apple_platform.h
@@ -12,7 +12,7 @@
 #include "core/fxge/apple/fx_quartz_device.h"
 #include "core/fxge/cfx_gemodule.h"
 
-class CApplePlatform : public CFX_GEModule::PlatformIface {
+class CApplePlatform final : public CFX_GEModule::PlatformIface {
  public:
   CApplePlatform();
   ~CApplePlatform() override;
diff --git a/core/fxge/cfx_face.h b/core/fxge/cfx_face.h
index 2412043..c1dcf79 100644
--- a/core/fxge/cfx_face.h
+++ b/core/fxge/cfx_face.h
@@ -10,7 +10,7 @@
 #include "core/fxge/fx_freetype.h"
 #include "third_party/base/span.h"
 
-class CFX_Face : public Retainable, public Observable {
+class CFX_Face final : public Retainable, public Observable {
  public:
   static RetainPtr<CFX_Face> New(FT_Library library,
                                  const RetainPtr<Retainable>& pDesc,
diff --git a/core/fxge/cfx_glyphcache.h b/core/fxge/cfx_glyphcache.h
index f8d432b..1ebfeb3 100644
--- a/core/fxge/cfx_glyphcache.h
+++ b/core/fxge/cfx_glyphcache.h
@@ -27,7 +27,7 @@
 class CFX_Path;
 struct CFX_TextRenderOptions;
 
-class CFX_GlyphCache : public Retainable, public Observable {
+class CFX_GlyphCache final : public Retainable, public Observable {
  public:
   CONSTRUCT_VIA_MAKE_RETAIN;
   ~CFX_GlyphCache() override;
diff --git a/core/fxge/cfx_graphstatedata.h b/core/fxge/cfx_graphstatedata.h
index d8f4bc6..eb5190a 100644
--- a/core/fxge/cfx_graphstatedata.h
+++ b/core/fxge/cfx_graphstatedata.h
@@ -35,8 +35,8 @@
   std::vector<float> m_DashArray;
 };
 
-class CFX_RetainableGraphStateData : public Retainable,
-                                     public CFX_GraphStateData {
+class CFX_RetainableGraphStateData final : public Retainable,
+                                           public CFX_GraphStateData {
  public:
   CONSTRUCT_VIA_MAKE_RETAIN;
 
diff --git a/core/fxge/win32/cwin32_platform.h b/core/fxge/win32/cwin32_platform.h
index 1a47402..745a8c3 100644
--- a/core/fxge/win32/cwin32_platform.h
+++ b/core/fxge/win32/cwin32_platform.h
@@ -12,7 +12,7 @@
 #include "core/fxge/cfx_gemodule.h"
 #include "core/fxge/win32/cgdi_plus_ext.h"
 
-class CWin32Platform : public CFX_GEModule::PlatformIface {
+class CWin32Platform final : public CFX_GEModule::PlatformIface {
  public:
   CWin32Platform();
   ~CWin32Platform() override;
diff --git a/fxjs/xfa/cfxjse_runtimedata.h b/fxjs/xfa/cfxjse_runtimedata.h
index 030cc9a..c896793 100644
--- a/fxjs/xfa/cfxjse_runtimedata.h
+++ b/fxjs/xfa/cfxjse_runtimedata.h
@@ -13,7 +13,7 @@
 #include "v8/include/v8-forward.h"
 #include "v8/include/v8-persistent-handle.h"
 
-class CFXJSE_RuntimeData : public FXJS_PerIsolateData::ExtensionIface {
+class CFXJSE_RuntimeData final : public FXJS_PerIsolateData::ExtensionIface {
  public:
   ~CFXJSE_RuntimeData() override;
 
@@ -22,12 +22,11 @@
   v8::Global<v8::FunctionTemplate> m_hRootContextGlobalTemplate;
   v8::Global<v8::Context> m_hRootContext;
 
- protected:
-  CFXJSE_RuntimeData();
-
+ private:
   static std::unique_ptr<CFXJSE_RuntimeData> Create(v8::Isolate* pIsolate);
 
- private:
+  CFXJSE_RuntimeData();
+
   CFXJSE_RuntimeData(const CFXJSE_RuntimeData&) = delete;
   CFXJSE_RuntimeData& operator=(const CFXJSE_RuntimeData&) = delete;
 };
diff --git a/xfa/fde/cfde_texteditengine.h b/xfa/fde/cfde_texteditengine.h
index 9cd8387..4d9c0c8 100644
--- a/xfa/fde/cfde_texteditengine.h
+++ b/xfa/fde/cfde_texteditengine.h
@@ -38,7 +38,7 @@
     default;
 inline FDE_TEXTEDITPIECE::~FDE_TEXTEDITPIECE() = default;
 
-class CFDE_TextEditEngine : public CFGAS_TxtBreak::Engine {
+class CFDE_TextEditEngine final : public CFGAS_TxtBreak::Engine {
  public:
   class Iterator {
    public:
diff --git a/xfa/fxfa/cxfa_ffapp.h b/xfa/fxfa/cxfa_ffapp.h
index f3a5c75..d26b90c 100644
--- a/xfa/fxfa/cxfa_ffapp.h
+++ b/xfa/fxfa/cxfa_ffapp.h
@@ -21,8 +21,8 @@
 class CXFA_FontMgr;
 class IFX_SeekableReadStream;
 
-class CXFA_FFApp : public cppgc::GarbageCollected<CXFA_FFApp>,
-                   public CFWL_App::AdapterIface {
+class CXFA_FFApp final : public cppgc::GarbageCollected<CXFA_FFApp>,
+                         public CFWL_App::AdapterIface {
  public:
   class CallbackIface {
    public:
diff --git a/xfa/fxfa/cxfa_fwladapterwidgetmgr.h b/xfa/fxfa/cxfa_fwladapterwidgetmgr.h
index c3f97dd..c300c35 100644
--- a/xfa/fxfa/cxfa_fwladapterwidgetmgr.h
+++ b/xfa/fxfa/cxfa_fwladapterwidgetmgr.h
@@ -14,7 +14,7 @@
 class CFWL_Widget;
 class CFX_RectF;
 
-class CXFA_FWLAdapterWidgetMgr
+class CXFA_FWLAdapterWidgetMgr final
     : public cppgc::GarbageCollected<CXFA_FWLAdapterWidgetMgr>,
       public CFWL_WidgetMgr::AdapterIface {
  public:
diff --git a/xfa/fxfa/layout/cxfa_layoutprocessor.h b/xfa/fxfa/layout/cxfa_layoutprocessor.h
index 8edefb6..21a8b06 100644
--- a/xfa/fxfa/layout/cxfa_layoutprocessor.h
+++ b/xfa/fxfa/layout/cxfa_layoutprocessor.h
@@ -28,7 +28,7 @@
 class Heap;
 }  // namespace cppgc
 
-class CXFA_LayoutProcessor : public CXFA_Document::LayoutProcessorIface {
+class CXFA_LayoutProcessor final : public CXFA_Document::LayoutProcessorIface {
  public:
   static CXFA_LayoutProcessor* FromDocument(const CXFA_Document* pXFADoc);
 
diff --git a/xfa/fxfa/parser/cxfa_localemgr.h b/xfa/fxfa/parser/cxfa_localemgr.h
index ce739e6..051bfe4 100644
--- a/xfa/fxfa/parser/cxfa_localemgr.h
+++ b/xfa/fxfa/parser/cxfa_localemgr.h
@@ -22,8 +22,8 @@
 class CXFA_NodeLocale;
 class CXFA_XMLLocale;
 
-class CXFA_LocaleMgr : public cppgc::GarbageCollected<CXFA_LocaleMgr>,
-                       public LocaleMgrIface {
+class CXFA_LocaleMgr final : public cppgc::GarbageCollected<CXFA_LocaleMgr>,
+                             public LocaleMgrIface {
  public:
   enum class LangID : uint16_t {
     k_zh_HK = 0x0c04,