xref: /aosp_15_r20/external/pdfium/samples/helpers/win32/com_factory.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2023 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef SAMPLES_HELPERS_WIN32_COM_FACTORY_H_
6 #define SAMPLES_HELPERS_WIN32_COM_FACTORY_H_
7 
8 struct IXpsOMObjectFactory;
9 
10 // Factory for COM instances.
11 class ComFactory final {
12  public:
13   ComFactory();
14   ~ComFactory();
15 
16   IXpsOMObjectFactory* GetXpsOMObjectFactory();
17 
18  private:
19   bool Initialize();
20 
21   bool initialized_ = false;
22   IXpsOMObjectFactory* xps_om_object_factory_ = nullptr;
23 };
24 
25 #endif  // SAMPLES_HELPERS_WIN32_COM_FACTORY_H_
26