1 // Copyright 2016 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef CORE_FXCODEC_JPX_JPXMODULE_H_ 8 #define CORE_FXCODEC_JPX_JPXMODULE_H_ 9 10 #include <memory> 11 #include <vector> 12 13 #include "core/fxcodec/jpx/cjpx_decoder.h" 14 #include "core/fxcrt/fx_system.h" 15 #include "third_party/base/span.h" 16 17 namespace fxcodec { 18 19 class JpxModule { 20 public: 21 static std::unique_ptr<CJPX_Decoder> CreateDecoder( 22 pdfium::span<const uint8_t> src_span, 23 CJPX_Decoder::ColorSpaceOption option); 24 25 JpxModule() = delete; 26 JpxModule(const JpxModule&) = delete; 27 JpxModule& operator=(const JpxModule&) = delete; 28 }; 29 30 } // namespace fxcodec 31 32 using JpxModule = fxcodec::JpxModule; 33 34 #endif // CORE_FXCODEC_JPX_JPXMODULE_H_ 35