Rename TiffModule to TiffDecoder.

Change-Id: I7c02614126bdf8b7bf0f91f9de5eae8f4238934e
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/69916
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxcodec/BUILD.gn b/core/fxcodec/BUILD.gn
index 41270b4..34023c6 100644
--- a/core/fxcodec/BUILD.gn
+++ b/core/fxcodec/BUILD.gn
@@ -120,8 +120,8 @@
     }
     if (pdf_enable_xfa_tiff) {
       sources += [
-        "tiff/tiffmodule.cpp",
-        "tiff/tiffmodule.h",
+        "tiff/tiff_decoder.cpp",
+        "tiff/tiff_decoder.h",
       ]
       deps += [ "../../third_party:fx_tiff" ]
     }
diff --git a/core/fxcodec/progressivedecoder.cpp b/core/fxcodec/progressivedecoder.cpp
index 1541cd1..09c3d39 100644
--- a/core/fxcodec/progressivedecoder.cpp
+++ b/core/fxcodec/progressivedecoder.cpp
@@ -24,7 +24,7 @@
 #include "third_party/base/ptr_util.h"
 
 #ifdef PDF_ENABLE_XFA_TIFF
-#include "core/fxcodec/tiff/tiffmodule.h"
+#include "core/fxcodec/tiff/tiff_decoder.h"
 #endif  // PDF_ENABLE_XFA_TIFF
 
 namespace fxcodec {
@@ -1302,15 +1302,15 @@
 #ifdef PDF_ENABLE_XFA_TIFF
 bool ProgressiveDecoder::TiffDetectImageTypeFromFile(
     CFX_DIBAttribute* pAttribute) {
-  m_pTiffContext = TiffModule::CreateDecoder(m_pFile);
+  m_pTiffContext = TiffDecoder::CreateDecoder(m_pFile);
   if (!m_pTiffContext) {
     m_status = FXCODEC_STATUS_ERR_FORMAT;
     return false;
   }
   int32_t dummy_bpc;
-  bool ret = TiffModule::LoadFrameInfo(m_pTiffContext.get(), 0, &m_SrcWidth,
-                                       &m_SrcHeight, &m_SrcComponents,
-                                       &dummy_bpc, pAttribute);
+  bool ret = TiffDecoder::LoadFrameInfo(m_pTiffContext.get(), 0, &m_SrcWidth,
+                                        &m_SrcHeight, &m_SrcComponents,
+                                        &dummy_bpc, pAttribute);
   m_SrcComponents = 4;
   m_clipBox = FX_RECT(0, 0, m_SrcWidth, m_SrcHeight);
   if (!ret) {
@@ -1329,7 +1329,7 @@
       m_startX == 0 && m_startY == 0 && m_clipBox.left == 0 &&
       m_clipBox.top == 0 && m_clipBox.right == m_SrcWidth &&
       m_clipBox.bottom == m_SrcHeight) {
-    ret = TiffModule::Decode(m_pTiffContext.get(), m_pDeviceBitmap);
+    ret = TiffDecoder::Decode(m_pTiffContext.get(), m_pDeviceBitmap);
     m_pDeviceBitmap = nullptr;
     m_pFile = nullptr;
     if (!ret) {
@@ -1348,7 +1348,7 @@
     m_status = FXCODEC_STATUS_ERR_MEMORY;
     return m_status;
   }
-  ret = TiffModule::Decode(m_pTiffContext.get(), pDIBitmap);
+  ret = TiffDecoder::Decode(m_pTiffContext.get(), pDIBitmap);
   if (!ret) {
     m_pDeviceBitmap = nullptr;
     m_pFile = nullptr;
diff --git a/core/fxcodec/tiff/tiffmodule.cpp b/core/fxcodec/tiff/tiff_decoder.cpp
similarity index 95%
rename from core/fxcodec/tiff/tiffmodule.cpp
rename to core/fxcodec/tiff/tiff_decoder.cpp
index 8c560f2..f2b86fa 100644
--- a/core/fxcodec/tiff/tiffmodule.cpp
+++ b/core/fxcodec/tiff/tiff_decoder.cpp
@@ -4,7 +4,7 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "core/fxcodec/tiff/tiffmodule.h"
+#include "core/fxcodec/tiff/tiff_decoder.h"
 
 #include <limits>
 #include <memory>
@@ -484,7 +484,7 @@
 namespace fxcodec {
 
 // static
-std::unique_ptr<ProgressiveDecoderIface::Context> TiffModule::CreateDecoder(
+std::unique_ptr<ProgressiveDecoderIface::Context> TiffDecoder::CreateDecoder(
     const RetainPtr<IFX_SeekableReadStream>& file_ptr) {
   auto pDecoder = pdfium::MakeUnique<CTiffContext>();
   if (!pDecoder->InitDecoder(file_ptr))
@@ -494,13 +494,13 @@
 }
 
 // static
-bool TiffModule::LoadFrameInfo(ProgressiveDecoderIface::Context* pContext,
-                               int32_t frame,
-                               int32_t* width,
-                               int32_t* height,
-                               int32_t* comps,
-                               int32_t* bpc,
-                               CFX_DIBAttribute* pAttribute) {
+bool TiffDecoder::LoadFrameInfo(ProgressiveDecoderIface::Context* pContext,
+                                int32_t frame,
+                                int32_t* width,
+                                int32_t* height,
+                                int32_t* comps,
+                                int32_t* bpc,
+                                CFX_DIBAttribute* pAttribute) {
   ASSERT(pAttribute);
 
   auto* ctx = static_cast<CTiffContext*>(pContext);
@@ -508,8 +508,8 @@
 }
 
 // static
-bool TiffModule::Decode(ProgressiveDecoderIface::Context* pContext,
-                        const RetainPtr<CFX_DIBitmap>& pDIBitmap) {
+bool TiffDecoder::Decode(ProgressiveDecoderIface::Context* pContext,
+                         const RetainPtr<CFX_DIBitmap>& pDIBitmap) {
   auto* ctx = static_cast<CTiffContext*>(pContext);
   return ctx->Decode(pDIBitmap);
 }
diff --git a/core/fxcodec/tiff/tiffmodule.h b/core/fxcodec/tiff/tiff_decoder.h
similarity index 77%
rename from core/fxcodec/tiff/tiffmodule.h
rename to core/fxcodec/tiff/tiff_decoder.h
index 3c60d14..7363559 100644
--- a/core/fxcodec/tiff/tiffmodule.h
+++ b/core/fxcodec/tiff/tiff_decoder.h
@@ -4,8 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#ifndef CORE_FXCODEC_TIFF_TIFFMODULE_H_
-#define CORE_FXCODEC_TIFF_TIFFMODULE_H_
+#ifndef CORE_FXCODEC_TIFF_TIFF_DECODER_H_
+#define CORE_FXCODEC_TIFF_TIFF_DECODER_H_
 
 #include <memory>
 
@@ -22,7 +22,7 @@
 
 class CFX_DIBAttribute;
 
-class TiffModule {
+class TiffDecoder {
  public:
   static std::unique_ptr<ProgressiveDecoderIface::Context> CreateDecoder(
       const RetainPtr<IFX_SeekableReadStream>& file_ptr);
@@ -37,13 +37,13 @@
   static bool Decode(ProgressiveDecoderIface::Context* ctx,
                      const RetainPtr<CFX_DIBitmap>& pDIBitmap);
 
-  TiffModule() = delete;
-  TiffModule(const TiffModule&) = delete;
-  TiffModule& operator=(const TiffModule&) = delete;
+  TiffDecoder() = delete;
+  TiffDecoder(const TiffDecoder&) = delete;
+  TiffDecoder& operator=(const TiffDecoder&) = delete;
 };
 
 }  // namespace fxcodec
 
-using TiffModule = fxcodec::TiffModule;
+using TiffDecoder = fxcodec::TiffDecoder;
 
-#endif  // CORE_FXCODEC_TIFF_TIFFMODULE_H_
+#endif  // CORE_FXCODEC_TIFF_TIFF_DECODER_H_