1 // Copyright 2014 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 FPDFSDK_JAVASCRIPT_ICON_H_
8 #define FPDFSDK_JAVASCRIPT_ICON_H_
9 
10 #include "fpdfsdk/javascript/JS_Define.h"
11 
12 class CPDF_Stream;
13 
14 class Icon : public CJS_EmbedObj {
15  public:
16   explicit Icon(CJS_Object* pJSObject);
17   ~Icon() override;
18 
19   bool name(CJS_Runtime* pRuntime, CJS_PropValue& vp, CFX_WideString& sError);
GetIconName()20   CFX_WideString GetIconName() const { return m_swIconName; }
SetIconName(CFX_WideString name)21   void SetIconName(CFX_WideString name) { m_swIconName = name; }
22 
23  private:
24   CFX_WideString m_swIconName;
25 };
26 
27 class CJS_Icon : public CJS_Object {
28  public:
CJS_Icon(v8::Local<v8::Object> pObject)29   explicit CJS_Icon(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_Icon()30   ~CJS_Icon() override {}
31 
32   DECLARE_JS_CLASS();
33   JS_STATIC_PROP(name, Icon);
34 };
35 
36 #endif  // FPDFSDK_JAVASCRIPT_ICON_H_
37