diff options
author | weili <weili@chromium.org> | 2016-07-20 10:35:31 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-20 10:35:31 -0700 |
commit | 47228aceb86744f858ab8bfa98f3f8b62054dfae (patch) | |
tree | d5d8abbc5eaeb23b291cf604bf33c77cf648b0bb /xfa/fwl/theme/cfwl_arrowdata.h | |
parent | 31f8740fe51ceca8e973a2efe40d4d440d7a5cb7 (diff) | |
download | pdfium-47228aceb86744f858ab8bfa98f3f8b62054dfae.tar.xz |
Clean up singleton implementation
Move the singleton instances into their namespaces, and use
get()/getInstance() for uniform accesses.
Review-Url: https://codereview.chromium.org/2154843002
Diffstat (limited to 'xfa/fwl/theme/cfwl_arrowdata.h')
-rw-r--r-- | xfa/fwl/theme/cfwl_arrowdata.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/xfa/fwl/theme/cfwl_arrowdata.h b/xfa/fwl/theme/cfwl_arrowdata.h new file mode 100644 index 0000000000..88982ab12d --- /dev/null +++ b/xfa/fwl/theme/cfwl_arrowdata.h @@ -0,0 +1,36 @@ +// Copyright 2016 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef XFA_FWL_THEME_CFWL_ARROWDATA_H_ +#define XFA_FWL_THEME_CFWL_ARROWDATA_H_ + +#include <memory> + +#include "core/fxcrt/include/fx_system.h" +#include "core/fxge/include/fx_dib.h" + +class CFWL_ArrowData { + public: + struct CColorData { + FX_ARGB clrBorder[4]; + FX_ARGB clrStart[4]; + FX_ARGB clrEnd[4]; + FX_ARGB clrSign[4]; + }; + + static CFWL_ArrowData* GetInstance(); + static FX_BOOL HasInstance(); + static void DestroyInstance(); + void SetColorData(uint32_t dwID); + + std::unique_ptr<CColorData> m_pColorData; + + private: + CFWL_ArrowData(); + ~CFWL_ArrowData(); +}; + +#endif // XFA_FWL_THEME_CFWL_ARROWDATA_H_ |